mirror of
https://github.com/systemd/systemd.git
synced 2026-11-07 13:57:10 +00:00
Properly use cg_pidref_get_unit_full() for the system service and cg_pidref_get_user_unit_full() for the user service. Previously, calling `machinectl kill` on an unprivileged `systemd-nspawn` instance would call `KillUnitSubgroup()` on `user@UID.service`. The Varlink method also didn't record the cgroup path of machines in a subgroup, so machined didn't watch it for becoming empty. The D-Bus method handled both of these correctly, so this PR just factors out the logic into a common helper function.