diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-02-08 07:00:08 -0800 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-05-03 03:28:38 -0700 |
commit | 078de5f706ece36afd73bb4b8283314132d2dfdf (patch) | |
tree | 0dee00713f9cb5e2516260a66b8df99ef7d03e4d /security | |
parent | ae2975bc3476243b45a1e2344236d7920c268f38 (diff) | |
download | op-kernel-dev-078de5f706ece36afd73bb4b8283314132d2dfdf.zip op-kernel-dev-078de5f706ece36afd73bb4b8283314132d2dfdf.tar.gz |
userns: Store uid and gid values in struct cred with kuid_t and kgid_t types
cred.h and a few trivial users of struct cred are changed. The rest of the users
of struct cred are left for other patches as there are too many changes to make
in one go and leave the change reviewable. If the user namespace is disabled and
CONFIG_UIDGID_STRICT_TYPE_CHECKS are disabled the code will contiue to compile
and behave correctly.
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/commoncap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index f2399d8..dbd465a 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -77,8 +77,7 @@ int cap_capable(const struct cred *cred, struct user_namespace *targ_ns, { for (;;) { /* The owner of the user namespace has all caps. */ - if (targ_ns != &init_user_ns && uid_eq(targ_ns->owner, - make_kuid(cred->user_ns, cred->euid))) + if (targ_ns != &init_user_ns && uid_eq(targ_ns->owner, cred->euid)) return 0; /* Do we have the necessary capabilities? */ |