diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 10c7ab2cf..f337be449 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 = (geteuid() == 0); + will_escape = !am_host_unpriv(); if (will_escape) basecginfo = read_file("/proc/1/cgroup"); else