diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2011-11-17 04:32:59 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-04-26 05:00:59 -0400 |
commit | 783291e6900292521a3895583785e0c04a56c5b3 (patch) | |
tree | 9dd368a25ea61b5913646b1d93ec99e865c058ba /include/linux/user_namespace.h | |
parent | 7b44ab978b77a91b327058a0f4db7e6fcdb90b92 (diff) |
userns: Simplify the user_namespace by making userns->creator a kuid.
- Transform userns->creator from a user_struct reference to a simple
kuid_t, kgid_t pair.
In cap_capable this allows the check to see if we are the creator of
a namespace to become the classic suser style euid permission check.
This allows us to remove the need for a struct cred in the mapping
functions and still be able to dispaly the user namespace creators
uid and gid as 0.
- Remove the now unnecessary delayed_work in free_user_ns.
All that is left for free_user_ns to do is to call kmem_cache_free
and put_user_ns. Those functions can be called in any context
so call them directly from free_user_ns removing the need for delayed work.
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/user_namespace.h')
-rw-r--r-- | include/linux/user_namespace.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index d767508db4f9..8a391bd53de2 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
@@ -9,8 +9,8 @@ | |||
9 | struct user_namespace { | 9 | struct user_namespace { |
10 | struct kref kref; | 10 | struct kref kref; |
11 | struct user_namespace *parent; | 11 | struct user_namespace *parent; |
12 | struct user_struct *creator; | 12 | kuid_t owner; |
13 | struct work_struct destroyer; | 13 | kgid_t group; |
14 | }; | 14 | }; |
15 | 15 | ||
16 | extern struct user_namespace init_user_ns; | 16 | extern struct user_namespace init_user_ns; |