From d87b52006520973acb049acf6def619da1fa5b0c 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 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 -- 2.47.2