From: Serge Hallyn Date: Tue, 13 Mar 2018 17:55:02 +0000 (-0500) Subject: Revert "cgroups: don't escape if we're not real root" X-Git-Tag: lxc-2.0.10~185 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d87b52006520973acb049acf6def619da1fa5b0c;p=thirdparty%2Flxc.git Revert "cgroups: don't escape if we're not real root" This reverts commit 8d961e28f1d759669b477a659cbb694aaa2af915. Unfortunately I don't believe the check is correct in the general case. Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 088b6c94f..a17d59b12 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1357,7 +1357,7 @@ static char *cg_unified_get_current_cgroup(void) bool will_escape; char *copy = NULL; - will_escape = !am_host_unpriv(); + will_escape = (geteuid() == 0); if (will_escape) basecginfo = read_file("/proc/1/cgroup"); else