diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2016-06-06 15:48:04 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2016-06-23 15:41:55 -0500 |
commit | a001e74cef34d95ede6535ef521011c612657a3a (patch) | |
tree | ca0917ef4ac8e75675ba32d69dd7dce29696ba57 /fs/namespace.c | |
parent | 6e4eab577a0cae15b3da9b888cff16fe57981b3e (diff) | |
download | linux-a001e74cef34d95ede6535ef521011c612657a3a.tar.gz |
mnt: Move the FS_USERNS_MOUNT check into sget_userns
Allowing a filesystem to be mounted by other than root in the initial
user namespace is a filesystem property not a mount namespace property
and as such should be checked in filesystem specific code. Move the
FS_USERNS_MOUNT test into super.c:sget_userns().
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 1a69aa786975..2e13f6cfe5df 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -2397,10 +2397,6 @@ static int do_new_mount(struct path *path, const char *fstype, int flags, return -ENODEV; if (user_ns != &init_user_ns) { - if (!(type->fs_flags & FS_USERNS_MOUNT)) { - put_filesystem(type); - return -EPERM; - } /* Only in special cases allow devices from mounts * created outside the initial user namespace. */ |