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>
This commit is contained in:
@@ -160,8 +160,8 @@ generic_match(struct auth_cred *acred, struct rpc_cred *cred, int flags)
|
||||
if (gcred->acred.group_info->ngroups != acred->group_info->ngroups)
|
||||
goto out_nomatch;
|
||||
for (i = 0; i < gcred->acred.group_info->ngroups; i++) {
|
||||
if (GROUP_AT(gcred->acred.group_info, i) !=
|
||||
GROUP_AT(acred->group_info, i))
|
||||
if (!gid_eq(GROUP_AT(gcred->acred.group_info, i),
|
||||
GROUP_AT(acred->group_info, i)))
|
||||
goto out_nomatch;
|
||||
}
|
||||
out_match:
|
||||
|
Reference in New Issue
Block a user