summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2011-11-14 15:56:38 -0800
committerEric W. Biederman <ebiederm@xmission.com>2012-05-03 03:27:21 -0700
commitae2975bc3476243b45a1e2344236d7920c268f38 (patch)
treee4b2a8472f6047734b6e7e2bdc994375b2790323 /security
parent22d917d80e842829d0ca0a561967d728eb1d6303 (diff)
downloadblackbird-op-linux-ae2975bc3476243b45a1e2344236d7920c268f38.tar.gz
blackbird-op-linux-ae2975bc3476243b45a1e2344236d7920c268f38.zip
userns: Convert group_info values from gid_t to kgid_t.
As a first step to converting struct cred to be all kuid_t and kgid_t values convert the group values stored in group_info to always be kgid_t values. Unless user namespaces are used this change should have no effect. 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/keys/permission.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/keys/permission.c b/security/keys/permission.c
index e146cbd714bd..5442900d2929 100644
--- a/security/keys/permission.c
+++ b/security/keys/permission.c
@@ -53,7 +53,8 @@ int key_task_permission(const key_ref_t key_ref, const struct cred *cred,
goto use_these_perms;
}
- ret = groups_search(cred->group_info, key->gid);
+ ret = groups_search(cred->group_info,
+ make_kgid(current_user_ns(), key->gid));
if (ret) {
kperm = key->perm >> 8;
goto use_these_perms;
OpenPOWER on IntegriCloud