systemctl: make sure "systemctl -M status" shows cgroup tree of container not host
authorLennart Poettering <lennart@poettering.net>
Thu, 28 Oct 2021 14:44:29 +0000 (16:44 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 28 Oct 2021 16:53:46 +0000 (18:53 +0200)
commit038cae098b6d85ad9fb06594d36f49915d32f000
tree4caf9533aff0c0a81976d91ed9147591dc02dd3e
parent35ac0260db7b896604d156e9638ad15700083508
systemctl: make sure "systemctl -M status" shows cgroup tree of container not host

This shows the cgroup tree of the root slice of the container now, by
querying the cgroup pid tree via the bus instead of going directly to
the cgroupfs.

A fallback is kept for really old systemd versions where querying the
PID tree was not available.

Fixes: #20958
src/systemctl/systemctl-show.c