Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357804
b: refs/heads/master
c: 0b4d51b
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman committed Feb 13, 2013
1 parent 17e1864 commit e14aaee
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 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: 7eaf040b720bc8c0ce5cd49151ca194ca2d56842
refs/heads/master: 0b4d51b02a2e941beec6f02a6c7a32c5a28c5b43
8 changes: 4 additions & 4 deletions trunk/net/sunrpc/auth_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ machine_cred_match(struct auth_cred *acred, struct generic_cred *gcred, int flag
{
if (!gcred->acred.machine_cred ||
gcred->acred.principal != acred->principal ||
gcred->acred.uid != acred->uid ||
gcred->acred.gid != acred->gid)
!uid_eq(gcred->acred.uid, acred->uid) ||
!gid_eq(gcred->acred.gid, acred->gid))
return 0;
return 1;
}
Expand All @@ -147,8 +147,8 @@ generic_match(struct auth_cred *acred, struct rpc_cred *cred, int flags)
if (acred->machine_cred)
return machine_cred_match(acred, gcred, flags);

if (gcred->acred.uid != acred->uid ||
gcred->acred.gid != acred->gid ||
if (!uid_eq(gcred->acred.uid, acred->uid) ||
!gid_eq(gcred->acred.gid, acred->gid) ||
gcred->acred.machine_cred != 0)
goto out_nomatch;

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/sunrpc/auth_gss/auth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ __gss_find_upcall(struct rpc_pipe *pipe, kuid_t uid)
{
struct gss_upcall_msg *pos;
list_for_each_entry(pos, &pipe->in_downcall, list) {
if (pos->uid != uid)
if (!uid_eq(pos->uid, uid))
continue;
atomic_inc(&pos->count);
dprintk("RPC: %s found msg %p\n", __func__, pos);
Expand Down Expand Up @@ -1115,7 +1115,7 @@ gss_match(struct auth_cred *acred, struct rpc_cred *rc, int flags)
}
if (gss_cred->gc_principal != NULL)
return 0;
return rc->cr_uid == acred->uid;
return uid_eq(rc->cr_uid, acred->uid);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/sunrpc/auth_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ unx_match(struct auth_cred *acred, struct rpc_cred *rcred, int flags)
unsigned int i;


if (cred->uc_uid != acred->uid || cred->uc_gid != acred->gid)
if (!uid_eq(cred->uc_uid, acred->uid) || !gid_eq(cred->uc_gid, acred->gid))
return 0;

if (acred->group_info != NULL)
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/sunrpc/svcauth_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ static int unix_gid_match(struct cache_head *corig, struct cache_head *cnew)
{
struct unix_gid *orig = container_of(corig, struct unix_gid, h);
struct unix_gid *new = container_of(cnew, struct unix_gid, h);
return orig->uid == new->uid;
return uid_eq(orig->uid, new->uid);
}
static void unix_gid_init(struct cache_head *cnew, struct cache_head *citem)
{
Expand Down

0 comments on commit e14aaee

Please sign in to comment.