aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric W. Biederman2011-11-16 23:59:43 -0600
committerEric W. Biederman2012-04-07 18:55:52 -0500
commitaeb3ae9da9b50a386b22af786d19b623e8d9f0fa (patch)
tree3db9772ea99c931914bec7ded51f896f1d2e24ec /security/commoncap.c
parent0093ccb68f3753c0ba4d74c89d7e0f444b8d6123 (diff)
downloadkernel-common-aeb3ae9da9b50a386b22af786d19b623e8d9f0fa.tar.gz
kernel-common-aeb3ae9da9b50a386b22af786d19b623e8d9f0fa.tar.xz
kernel-common-aeb3ae9da9b50a386b22af786d19b623e8d9f0fa.zip
userns: Add an explicit reference to the parent user namespace
I am about to remove the struct user_namespace reference from struct user_struct. So keep an explicit track of the parent user namespace. Take advantage of this new reference and replace instances of user_ns->creator->user_ns with user_ns->parent. Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'security/commoncap.c')
-rw-r--r--security/commoncap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index 8b3e10e2eac..435d074853f 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -92,7 +92,7 @@ int cap_capable(const struct cred *cred, struct user_namespace *targ_ns,
92 *If you have a capability in a parent user ns, then you have 92 *If you have a capability in a parent user ns, then you have
93 * it over all children user namespaces as well. 93 * it over all children user namespaces as well.
94 */ 94 */
95 targ_ns = targ_ns->creator->user_ns; 95 targ_ns = targ_ns->parent;
96 } 96 }
97 97
98 /* We never get here */ 98 /* We never get here */