diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-20 16:21:47 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-20 16:21:47 -0700 |
| commit | cf2d9500a5a0df61713b56f2f40aa0b81a6f9f63 (patch) | |
| tree | 945afa7596fcdc4d960812dee1812c187d282bff /kernel/user_namespace.c | |
| parent | 3f3b55bf7833d81d00c793d722e2af58d3b12963 (diff) | |
| parent | d714aaf649460cbfd5e82e75520baa856b4fa0a0 (diff) | |
Merge branch 'usb-linus' into usb-next
This is to pick up the fixes in that branch, and let Alan fix the merge
error in drivers/usb/host/ehci-timer.c better than I just did (as I know
I messed it up...)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/user_namespace.c')
| -rw-r--r-- | kernel/user_namespace.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index 8b650837083..b14f4d34204 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -21,6 +21,7 @@ #include <linux/uaccess.h> #include <linux/ctype.h> #include <linux/projid.h> +#include <linux/fs_struct.h> static struct kmem_cache *user_ns_cachep __read_mostly; @@ -837,6 +838,9 @@ static int userns_install(struct nsproxy *nsproxy, void *ns) if (atomic_read(¤t->mm->mm_users) > 1) return -EINVAL; + if (current->fs->users != 1) + return -EINVAL; + if (!ns_capable(user_ns, CAP_SYS_ADMIN)) return -EPERM; |
