aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_gss
diff options
context:
space:
mode:
authorFrank Sorenson <sorenson@redhat.com>2016-09-29 11:44:40 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-09-30 15:47:13 -0400
commita960f8d6db431f5785ee28dbe903d61d821f368e (patch)
treebffd882be6c2e5addf136606c0aeb45850543574 /net/sunrpc/auth_gss
parent1e035d065f3415809c056fb7537320a74c718537 (diff)
sunrpc: add RPCSEC_GSS hash_cred() function
Add a hash_cred() function for RPCSEC_GSS, using only the uid from the auth_cred. Signed-off-by: Frank Sorenson <sorenson@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/auth_gss')
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 976c7812bbd5..d8bd97a5a7c9 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -1298,6 +1298,12 @@ gss_destroy_cred(struct rpc_cred *cred)
1298 gss_destroy_nullcred(cred); 1298 gss_destroy_nullcred(cred);
1299} 1299}
1300 1300
1301static int
1302gss_hash_cred(struct auth_cred *acred, unsigned int hashbits)
1303{
1304 return hash_64(from_kuid(&init_user_ns, acred->uid), hashbits);
1305}
1306
1301/* 1307/*
1302 * Lookup RPCSEC_GSS cred for the current process 1308 * Lookup RPCSEC_GSS cred for the current process
1303 */ 1309 */
@@ -1982,6 +1988,7 @@ static const struct rpc_authops authgss_ops = {
1982 .au_name = "RPCSEC_GSS", 1988 .au_name = "RPCSEC_GSS",
1983 .create = gss_create, 1989 .create = gss_create,
1984 .destroy = gss_destroy, 1990 .destroy = gss_destroy,
1991 .hash_cred = gss_hash_cred,
1985 .lookup_cred = gss_lookup_cred, 1992 .lookup_cred = gss_lookup_cred,
1986 .crcreate = gss_create_cred, 1993 .crcreate = gss_create_cred,
1987 .list_pseudoflavors = gss_mech_list_pseudoflavors, 1994 .list_pseudoflavors = gss_mech_list_pseudoflavors,