mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 01:51:39 +00:00
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>
This commit is contained in:
parent
0093ccb68f
commit
aeb3ae9da9
3 changed files with 8 additions and 8 deletions
|
@ -92,7 +92,7 @@ int cap_capable(const struct cred *cred, struct user_namespace *targ_ns,
|
|||
*If you have a capability in a parent user ns, then you have
|
||||
* it over all children user namespaces as well.
|
||||
*/
|
||||
targ_ns = targ_ns->creator->user_ns;
|
||||
targ_ns = targ_ns->parent;
|
||||
}
|
||||
|
||||
/* We never get here */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue