Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357805
b: refs/heads/master
c: 9132adb
h: refs/heads/master
i:
  357803: 17e1864
v: v3
  • Loading branch information
Eric W. Biederman committed Feb 13, 2013
1 parent e14aaee commit ba03232
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0b4d51b02a2e941beec6f02a6c7a32c5a28c5b43
refs/heads/master: 9132adb0212c7ddf37d1c2a26c12f8fe7706827d
14 changes: 4 additions & 10 deletions trunk/net/sunrpc/auth_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,8 @@ unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
groups = NFS_NGROUPS;

cred->uc_gid = acred->gid;
for (i = 0; i < groups; i++) {
gid_t gid;
gid = from_kgid(&init_user_ns, GROUP_AT(acred->group_info, i));
cred->uc_gids[i] = gid;
}
for (i = 0; i < groups; i++)
cred->uc_gids[i] = GROUP_AT(acred->group_info, i);
if (i < NFS_NGROUPS)
cred->uc_gids[i] = INVALID_GID;

Expand Down Expand Up @@ -130,12 +127,9 @@ unx_match(struct auth_cred *acred, struct rpc_cred *rcred, int flags)
groups = acred->group_info->ngroups;
if (groups > NFS_NGROUPS)
groups = NFS_NGROUPS;
for (i = 0; i < groups ; i++) {
gid_t gid;
gid = from_kgid(&init_user_ns, GROUP_AT(acred->group_info, i));
if (cred->uc_gids[i] != gid)
for (i = 0; i < groups ; i++)
if (!gid_eq(cred->uc_gids[i], GROUP_AT(acred->group_info, i)))
return 0;
}
if (groups < NFS_NGROUPS &&
cred->uc_gids[groups] != INVALID_GID)
return 0;
Expand Down

0 comments on commit ba03232

Please sign in to comment.