]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: SAUCE: (noup) Add FS_USERNS_FLAG to cgroup fs
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 18 Nov 2015 16:56:45 +0000 (10:56 -0600)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:19:35 +0000 (10:19 +0100)
BugLink: http://bugs.launchpad.net/bugs/1546775
allowing root in a non-init user namespace to mount it.  This should
now be safe, because

1. non-init-root cannot mount a previously unbound subsystem
2. the task doing the mount must be privileged with respect to the
   user namespace owning the cgroup namespace
3. the mounted subsystem will have its current cgroup as the root dentry.
   the permissions will be unchanged, so tasks will receive no new
   privilege over the cgroups which they did not have on the original
   mounts.

Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
kernel/cgroup.c

index 22e761c9b1578e8feae49ca2591c826445be7895..9510da916fa3fd5d654a0e83f828a76c3f3c5086 100644 (file)
@@ -2247,6 +2247,7 @@ static struct file_system_type cgroup_fs_type = {
        .name = "cgroup",
        .mount = cgroup_mount,
        .kill_sb = cgroup_kill_sb,
+       .fs_flags = FS_USERNS_MOUNT,
 };
 
 static char *