From 53386adb78119a5495fd5c88d652d5f36c6a5e57 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Tue, 13 Mar 2018 12:55:02 -0500 Subject: [PATCH] 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 --- src/lxc/cgroups/cgfsng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.2