summaryrefslogtreecommitdiff
path: root/dbus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-02-12 21:57:39 +0100
committerLennart Poettering <lennart@poettering.net>2010-02-12 21:57:39 +0100
commitdfcd764ea64a61280eeb3902505b58aca06111f9 (patch)
treeeda5b9d066b7b64922d70a6c6baea5d99817ad06 /dbus.c
parent7898b0cf7ec1a30454538b415e25d544ecee5d5b (diff)
manager: identify the init/system/user mode we are running it and pick D-Bus bus accordingly
Diffstat (limited to 'dbus.c')
-rw-r--r--dbus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbus.c b/dbus.c
index 0088b2c337..bfec0f9782 100644
--- a/dbus.c
+++ b/dbus.c
@@ -378,7 +378,7 @@ int bus_init(Manager *m) {
dbus_connection_set_change_sigpipe(FALSE);
dbus_error_init(&error);
- if (!(m->bus = dbus_bus_get_private(m->is_init ? DBUS_BUS_SYSTEM : DBUS_BUS_SESSION, &error))) {
+ if (!(m->bus = dbus_bus_get_private(m->running_as == MANAGER_USER ? DBUS_BUS_SESSION : DBUS_BUS_SYSTEM, &error))) {
log_error("Failed to get D-Bus connection: %s", error.message);
dbus_error_free(&error);
return -ECONNREFUSED;