]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Revert "cgroups: don't escape if we're not real root" 2213/head
authorSerge Hallyn <shallyn@cisco.com>
Tue, 13 Mar 2018 17:55:02 +0000 (12:55 -0500)
committerSerge Hallyn <shallyn@cisco.com>
Tue, 13 Mar 2018 18:01:51 +0000 (13:01 -0500)
This reverts commit 8d961e28f1d759669b477a659cbb694aaa2af915.

Unfortunately I don't believe the check is correct in the general case.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
src/lxc/cgroups/cgfsng.c

index f337be449ab7fd1da1bbf4627352043bfe551cab..10c7ab2cf0d983a3d3c277e466cac4f9345b0d77 100644 (file)
@@ -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