From: Lennart Poettering Date: Tue, 20 Nov 2018 21:46:03 +0000 (+0100) Subject: cgroup: tighten manager_owns_host_root_cgroup() a bit X-Git-Tag: v240~225^2~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=28cfdc5aebc044c82b6716fa1fedf847c060d043;p=thirdparty%2Fsystemd.git cgroup: tighten manager_owns_host_root_cgroup() a bit This tightening is not strictly necessary (as the m->cgroup_root check further down does the same), but let's make this explicit. --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 823ed6cd424..bc676fc6981 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -39,6 +39,9 @@ bool manager_owns_host_root_cgroup(Manager *m) { * appears to be no nice way to detect whether we are in a CLONE_NEWCGROUP namespace we instead just check if * we run in any kind of container virtualization. */ + if (MANAGER_IS_USER(m)) + return false; + if (detect_container() > 0) return false;