]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Revert "cgroups: don't escape if we're not real root"
authorSerge Hallyn <shallyn@cisco.com>
Tue, 13 Mar 2018 17:55:02 +0000 (12:55 -0500)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 23 Aug 2018 20:44:00 +0000 (22:44 +0200)
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 088b6c94f8ef8f949bce668120f64402e6161cab..a17d59b1275ac7eeab25ac45e5b7f4f1450ad9e2 100644 (file)
@@ -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