summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-control.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus/bus-control.c')
-rw-r--r--src/libsystemd-bus/bus-control.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-control.c b/src/libsystemd-bus/bus-control.c
index 55986f349b..511ca20ee3 100644
--- a/src/libsystemd-bus/bus-control.c
+++ b/src/libsystemd-bus/bus-control.c
@@ -33,6 +33,7 @@
#include "bus-control.h"
#include "bus-bloom.h"
#include "bus-util.h"
+#include "cgroup-util.h"
_public_ int sd_bus_get_unique_name(sd_bus *bus, const char **unique) {
int r;
@@ -489,6 +490,18 @@ static int bus_get_owner_kdbus(
goto fail;
}
+ if (!bus->cgroup_root) {
+ r = cg_get_root_path(&bus->cgroup_root);
+ if (r < 0)
+ goto fail;
+ }
+
+ c->cgroup_root = strdup(bus->cgroup_root);
+ if (!c->cgroup_root) {
+ r = -ENOMEM;
+ goto fail;
+ }
+
c->mask |= m;
}
break;