diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-06-24 03:55:31 +0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-11 07:40:35 +0400 |
commit | 5fe4755e2526a2aa82b7ed8daeb3aed74a236925 (patch) | |
tree | aceb993080fc6aac5861f04d8a8494becb4046eb /net/sunrpc/auth_gss | |
parent | f1c0a8615090359d57e096157feb9f900cbb233c (diff) | |
download | linux-5fe4755e2526a2aa82b7ed8daeb3aed74a236925.tar.xz |
SUNRPC: Clean up rpc credential initialisation
Add a helper rpc_cred_init()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/auth_gss')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 177a9e413c0a..766de0a41b22 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c @@ -727,15 +727,11 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags) if (!(cred = kzalloc(sizeof(*cred), GFP_KERNEL))) goto out_err; - atomic_set(&cred->gc_count, 1); - cred->gc_uid = acred->uid; + rpcauth_init_cred(&cred->gc_base, acred, auth, &gss_credops); /* * Note: in order to force a call to call_refresh(), we deliberately * fail to flag the credential as RPCAUTH_CRED_UPTODATE. */ - cred->gc_flags = 0; - cred->gc_base.cr_auth = auth; - cred->gc_base.cr_ops = &gss_credops; cred->gc_base.cr_flags = RPCAUTH_CRED_NEW; cred->gc_service = gss_auth->service; return &cred->gc_base; |