Skip to content

Commit

Permalink
userns: Allow unprivilged mounts of proc and sysfs
Browse files Browse the repository at this point in the history
- The context in which proc and sysfs are mounted have no
  effect on the the uid/gid of their files so no conversion is
  needed except allowing the mount.

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
  • Loading branch information
Eric W. Biederman committed Nov 20, 2012
1 parent c450f37 commit 4f326c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions fs/proc/root.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ static struct file_system_type proc_fs_type = {
.name = "proc",
.mount = proc_mount,
.kill_sb = proc_kill_sb,
.fs_flags = FS_USERNS_MOUNT,
};

void __init proc_root_init(void)
Expand Down
1 change: 1 addition & 0 deletions fs/sysfs/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ static struct file_system_type sysfs_fs_type = {
.name = "sysfs",
.mount = sysfs_mount,
.kill_sb = sysfs_kill_sb,
.fs_flags = FS_USERNS_MOUNT,
};

int __init sysfs_init(void)
Expand Down

0 comments on commit 4f326c0

Please sign in to comment.