summaryrefslogtreecommitdiff
path: root/app-emulation/libvirt/files/libvirt-6.8.0-fix-libvirt-lxc-dbus.patch
blob: ea1a2379533050d4b8f1e12d1f994fb393f1e5b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
https://bugs.gentoo.org/753761

diff --git a/src/util/virgdbus.c b/src/util/virgdbus.c
index 4360a6a..4ad1a5c 100644
--- a/src/util/virgdbus.c
+++ b/src/util/virgdbus.c
@@ -54,11 +54,15 @@ virGDBusBusInit(GBusType type, GError **error)
     if (sharedBus) {
         return g_bus_get_sync(type, NULL, error);
     } else {
+        GDBusConnectionFlags dbusFlags =
+                G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
+                G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION;
+
         address = g_dbus_address_get_for_bus_sync(type, NULL, error);
-        if (error)
+        if (*error)
             return NULL;
         return g_dbus_connection_new_for_address_sync(address,
-                                                      G_DBUS_CONNECTION_FLAGS_NONE,
+                                                      dbusFlags,
                                                       NULL,
                                                       NULL,
                                                       error);