sunrpc: Use uid_eq and gid_eq where appropriate
When comparing uids use uid_eq instead of ==. When comparing gids use gid_eq instead of ==. And unfortunate cost of type safety. Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
@@ -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);
|
||||
@@ -1115,7 +1115,7 @@ out:
|
||||
}
|
||||
if (gss_cred->gc_principal != NULL)
|
||||
return 0;
|
||||
return rc->cr_uid == acred->uid;
|
||||
return uid_eq(rc->cr_uid, acred->uid);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user