Merge pull request #2212 from tych0/cgroup-escape-host-unpriv

cgroups: don't escape if we're not real root
This commit is contained in:
Christian Brauner 2018-03-13 17:14:15 +01:00 committed by GitHub
commit f432873366
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1368,7 +1368,7 @@ static char *cg_unified_get_current_cgroup(void)
bool will_escape; bool will_escape;
char *copy = NULL; char *copy = NULL;
will_escape = (geteuid() == 0); will_escape = !am_host_unpriv();
if (will_escape) if (will_escape)
basecginfo = read_file("/proc/1/cgroup"); basecginfo = read_file("/proc/1/cgroup");
else else