diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-09-13 10:01:24 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-09-13 10:01:24 +0200 |
| commit | c7ef92cea98bc468bbc8e67b6e49d7365dc69482 (patch) | |
| tree | 1ed0118f697d72103eaf8fa53bd373be7a1c91ff /kernel/user_namespace.c | |
| parent | locking/qspinlock/x86: Only emit the test-and-set fallback when building gues... (diff) | |
| parent | Linux 4.3-rc1 (diff) | |
| download | linux-c7ef92cea98bc468bbc8e67b6e49d7365dc69482.tar.gz linux-c7ef92cea98bc468bbc8e67b6e49d7365dc69482.zip | |
Merge tag 'v4.3-rc1' into locking/core, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/user_namespace.c')
| -rw-r--r-- | kernel/user_namespace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index 4109f8320684..88fefa68c516 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -39,6 +39,7 @@ static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns) cred->cap_inheritable = CAP_EMPTY_SET; cred->cap_permitted = CAP_FULL_SET; cred->cap_effective = CAP_FULL_SET; + cred->cap_ambient = CAP_EMPTY_SET; cred->cap_bset = CAP_FULL_SET; #ifdef CONFIG_KEYS key_put(cred->request_key_auth); @@ -976,8 +977,8 @@ static int userns_install(struct nsproxy *nsproxy, struct ns_common *ns) if (user_ns == current_user_ns()) return -EINVAL; - /* Threaded processes may not enter a different user namespace */ - if (atomic_read(¤t->mm->mm_users) > 1) + /* Tasks that share a thread group must share a user namespace */ + if (!thread_group_empty(current)) return -EINVAL; if (current->fs->users != 1) |
