diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-08-27 16:32:22 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-08-27 16:32:22 +0200 |
commit | 057171efc103ac76c60a2a0d277d8bbf25415c21 (patch) | |
tree | 1f86acb043d5bf79725d89240c377fe2ed679066 /src/libsystemd/sd-bus/sd-bus.c | |
parent | 8faae625dc9b6322db452937f54176e56e65265a (diff) |
Revert "sd-bus: do not connect to dbus-1 socket when kdbus is available"
This reverts commit d4d00020d6ad855d65d31020fefa5003e1bb477f. The idea of
the commit is broken and needs to be reworked. We really cannot reduce
the bus-addresses to a single address. We always will have systemd with
native clients and legacy clients at the same time, so we also need both
addresses at the same time.
Diffstat (limited to 'src/libsystemd/sd-bus/sd-bus.c')
-rw-r--r-- | src/libsystemd/sd-bus/sd-bus.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index 31cdcb4e5b..5434d62af5 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -44,6 +44,7 @@ #include "bus-kernel.h" #include "bus-control.h" #include "bus-objects.h" +#include "bus-util.h" #include "bus-container.h" #include "bus-protocol.h" #include "bus-track.h" @@ -1173,10 +1174,7 @@ int bus_set_address_system(sd_bus *b) { if (e) return sd_bus_set_address(b, e); - if (is_kdbus_available()) - return sd_bus_set_address(b, KERNEL_SYSTEM_BUS_ADDRESS); - - return sd_bus_set_address(b, UNIX_SYSTEM_BUS_ADDRESS); + return sd_bus_set_address(b, DEFAULT_SYSTEM_BUS_ADDRESS); } _public_ int sd_bus_open_system(sd_bus **ret) { @@ -1224,17 +1222,16 @@ int bus_set_address_user(sd_bus *b) { return sd_bus_set_address(b, e); e = secure_getenv("XDG_RUNTIME_DIR"); - if (is_kdbus_available()) - (void) asprintf(&b->address, KERNEL_USER_BUS_ADDRESS_FMT, getuid()); - else if (e) { + if (e) { _cleanup_free_ char *ee = NULL; ee = bus_address_escape(e); if (!ee) return -ENOMEM; - (void) asprintf(&b->address, UNIX_USER_BUS_ADDRESS_FMT, ee); - } + (void) asprintf(&b->address, KERNEL_USER_BUS_ADDRESS_FMT ";" UNIX_USER_BUS_ADDRESS_FMT, getuid(), ee); + } else + (void) asprintf(&b->address, KERNEL_USER_BUS_ADDRESS_FMT, getuid()); if (!b->address) return -ENOMEM; |