diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-02 10:57:30 +0100 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2013-02-13 15:15:23 +0100 |
commit | 9e469e30d712b54cd3ff4a82d4dd5510522b8f16 (patch) | |
tree | e3bf5401b2489973a0b7f10e1f555f24e07f0341 /net/sunrpc/auth.c | |
parent | sunrpc: Update svcgss xdr handle to rpsec_contect cache (diff) | |
download | linux-9e469e30d712b54cd3ff4a82d4dd5510522b8f16.tar.xz linux-9e469e30d712b54cd3ff4a82d4dd5510522b8f16.zip |
sunrpc: Hash uids by first computing their value in the initial userns
In svcauth_unix introduce a helper unix_gid_hash as otherwise the
expresion to generate the hash value is just too long.
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'net/sunrpc/auth.c')
-rw-r--r-- | net/sunrpc/auth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 4cd0ecfe9837..392adc41e2e5 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c @@ -412,7 +412,7 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred * acred, *entry, *new; unsigned int nr; - nr = hash_long(acred->uid, cache->hashbits); + nr = hash_long(from_kuid(&init_user_ns, acred->uid), cache->hashbits); rcu_read_lock(); hlist_for_each_entry_rcu(entry, pos, &cache->hashtable[nr], cr_hash) { |