projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
[cascardo/linux.git]
/
net
/
sunrpc
/
auth_unix.c
diff --git
a/net/sunrpc/auth_unix.c
b/net/sunrpc/auth_unix.c
index
a1d768a
..
306fc0f
100644
(file)
--- a/
net/sunrpc/auth_unix.c
+++ b/
net/sunrpc/auth_unix.c
@@
-46,6
+46,14
@@
unx_destroy(struct rpc_auth *auth)
rpcauth_clear_credcache(auth->au_credcache);
}
rpcauth_clear_credcache(auth->au_credcache);
}
+static int
+unx_hash_cred(struct auth_cred *acred, unsigned int hashbits)
+{
+ return hash_64(from_kgid(&init_user_ns, acred->gid) |
+ ((u64)from_kuid(&init_user_ns, acred->uid) <<
+ (sizeof(gid_t) * 8)), hashbits);
+}
+
/*
* Lookup AUTH_UNIX creds for current process
*/
/*
* Lookup AUTH_UNIX creds for current process
*/
@@
-220,6
+228,7
@@
const struct rpc_authops authunix_ops = {
.au_name = "UNIX",
.create = unx_create,
.destroy = unx_destroy,
.au_name = "UNIX",
.create = unx_create,
.destroy = unx_destroy,
+ .hash_cred = unx_hash_cred,
.lookup_cred = unx_lookup_cred,
.crcreate = unx_create_cred,
};
.lookup_cred = unx_lookup_cred,
.crcreate = unx_create_cred,
};