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-3.0.0.beta2~8^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53386adb78119a5495fd5c88d652d5f36c6a5e57;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 f337be449..10c7ab2cf 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1368,7 +1368,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