summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/sd-bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-bus/sd-bus.c')
-rw-r--r--src/libsystemd/sd-bus/sd-bus.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index 0881b4779a..5dd6468707 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -1239,18 +1239,9 @@ int bus_set_address_user(sd_bus *b) {
if (!ee)
return -ENOMEM;
-#ifdef ENABLE_KDBUS
(void) asprintf(&b->address, KERNEL_USER_BUS_ADDRESS_FMT ";" UNIX_USER_BUS_ADDRESS_FMT, getuid(), ee);
-#else
- (void) asprintf(&b->address, UNIX_USER_BUS_ADDRESS_FMT, ee);
-#endif
- } else {
-#ifdef ENABLE_KDBUS
+ } else
(void) asprintf(&b->address, KERNEL_USER_BUS_ADDRESS_FMT, getuid());
-#else
- return -ECONNREFUSED;
-#endif
- }
if (!b->address)
return -ENOMEM;
@@ -1372,11 +1363,7 @@ int bus_set_address_system_machine(sd_bus *b, const char *machine) {
if (!e)
return -ENOMEM;
-#ifdef ENABLE_KDBUS
b->address = strjoin("x-machine-kernel:machine=", e, ";x-machine-unix:machine=", e, NULL);
-#else
- b->address = strjoin("x-machine-unix:machine=", e, NULL);
-#endif
if (!b->address)
return -ENOMEM;
@@ -2958,10 +2945,8 @@ _public_ int sd_bus_add_match(
/* Do not install server-side matches for matches
* against the local service, interface or bus
- * path. Also, when on kdbus don't install driver
- * matches server side. */
- if (scope == BUS_MATCH_GENERIC ||
- (!bus->is_kernel && scope == BUS_MATCH_DRIVER)) {
+ * path. */
+ if (scope != BUS_MATCH_LOCAL) {
if (!bus->is_kernel) {
/* When this is not a kernel transport, we