resolve_host_cgroup_parent

Function resolve_host_cgroup_parent 

Source
pub fn resolve_host_cgroup_parent() -> Result<String>
Expand description

Resolve the cgroup parent path for host_only tests.

Reads KTSTR_HOST_CGROUP_PARENT. Empty / unset falls back to DEFAULT_HOST_CGROUP_PARENT. A set value must be rooted under /sys/fs/cgroup (no relative paths, no random /tmp dirs) so an accidental misconfiguration surfaces here rather than as an opaque cgroupfs failure inside CgroupManager::setup.

Non-root callers are admitted: cgroup-v2 user delegation (Mode B/C: systemd Delegate=yes, container nsdelegate) is handled by build_host_cgroup_manager threading crate::KTSTR_CGROUP_WALK_ROOT_ENV into crate::cgroup::CgroupManager::with_walk_root so the subtree_control walk bails at the delegation root instead of EACCES-ing on user.slice.