From: josh-gordon-fb <110699866+josh-gordon-fb@users.noreply.github.com> Date: Tue, 9 Aug 2022 07:20:07 +0000 (-0700) Subject: core/cgroup: use bus locator (#24251) X-Git-Tag: v252-rc1~487 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=78fa2f91d208b51f2a4878012b9558389e9a7660;p=thirdparty%2Fsystemd.git core/cgroup: use bus locator (#24251) --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 871d79e0d25..8b389346150 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -13,6 +13,7 @@ #include "bpf-socket-bind.h" #include "btrfs-util.h" #include "bus-error.h" +#include "bus-locator.h" #include "cgroup-setup.h" #include "cgroup-util.h" #include "cgroup.h" @@ -2261,14 +2262,12 @@ static int unit_attach_pid_to_cgroup_via_bus(Unit *u, pid_t pid, const char *suf pp = strjoina("/", pp, suffix_path); path_simplify(pp); - r = sd_bus_call_method(u->manager->system_bus, - "org.freedesktop.systemd1", - "/org/freedesktop/systemd1", - "org.freedesktop.systemd1.Manager", - "AttachProcessesToUnit", - &error, NULL, - "ssau", - NULL /* empty unit name means client's unit, i.e. us */, pp, 1, (uint32_t) pid); + r = bus_call_method(u->manager->system_bus, + bus_systemd_mgr, + "AttachProcessesToUnit", + &error, NULL, + "ssau", + NULL /* empty unit name means client's unit, i.e. us */, pp, 1, (uint32_t) pid); if (r < 0) return log_unit_debug_errno(u, r, "Failed to attach unit process " PID_FMT " via the bus: %s", pid, bus_error_message(&error, r));