Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a960f8d6 authored by Frank Sorenson's avatar Frank Sorenson Committed by Anna Schumaker
Browse files

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: default avatarFrank Sorenson <sorenson@redhat.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 1e035d06
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -1298,6 +1298,12 @@ gss_destroy_cred(struct rpc_cred *cred)
	gss_destroy_nullcred(cred);
	gss_destroy_nullcred(cred);
}
}


static int
gss_hash_cred(struct auth_cred *acred, unsigned int hashbits)
{
	return hash_64(from_kuid(&init_user_ns, acred->uid), hashbits);
}

/*
/*
 * Lookup RPCSEC_GSS cred for the current process
 * Lookup RPCSEC_GSS cred for the current process
 */
 */
@@ -1982,6 +1988,7 @@ static const struct rpc_authops authgss_ops = {
	.au_name	= "RPCSEC_GSS",
	.au_name	= "RPCSEC_GSS",
	.create		= gss_create,
	.create		= gss_create,
	.destroy	= gss_destroy,
	.destroy	= gss_destroy,
	.hash_cred	= gss_hash_cred,
	.lookup_cred	= gss_lookup_cred,
	.lookup_cred	= gss_lookup_cred,
	.crcreate	= gss_create_cred,
	.crcreate	= gss_create_cred,
	.list_pseudoflavors = gss_mech_list_pseudoflavors,
	.list_pseudoflavors = gss_mech_list_pseudoflavors,