diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-06-07 10:14:14 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-10 23:40:31 -0400 |
commit | 4a8c1344dccb848dbcf0edabc8b5c51a8ecf2808 (patch) | |
tree | ecfa69d4bc36aefe86c2528240ef69da723f5bf4 /net/sunrpc/auth_gss | |
parent | c1384c9c4c184543375b52a0997d06cd98145164 (diff) |
SUNRPC: Add a backpointer from the struct rpc_cred to the rpc_auth
Cleans up an issue whereby rpcsec_gss uses the rpc_clnt->cl_auth. If we want
to be able to add several rpc_auths to a single rpc_clnt, then this abuse
must go.
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 4e4ccc5b6fea..e894e2fc360d 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -386,7 +386,7 @@ static inline int | |||
386 | gss_refresh_upcall(struct rpc_task *task) | 386 | gss_refresh_upcall(struct rpc_task *task) |
387 | { | 387 | { |
388 | struct rpc_cred *cred = task->tk_msg.rpc_cred; | 388 | struct rpc_cred *cred = task->tk_msg.rpc_cred; |
389 | struct gss_auth *gss_auth = container_of(task->tk_client->cl_auth, | 389 | struct gss_auth *gss_auth = container_of(cred->cr_auth, |
390 | struct gss_auth, rpc_auth); | 390 | struct gss_auth, rpc_auth); |
391 | struct gss_cred *gss_cred = container_of(cred, | 391 | struct gss_cred *gss_cred = container_of(cred, |
392 | struct gss_cred, gc_base); | 392 | struct gss_cred, gc_base); |
@@ -741,6 +741,7 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags) | |||
741 | * fail to flag the credential as RPCAUTH_CRED_UPTODATE. | 741 | * fail to flag the credential as RPCAUTH_CRED_UPTODATE. |
742 | */ | 742 | */ |
743 | cred->gc_flags = 0; | 743 | cred->gc_flags = 0; |
744 | cred->gc_base.cr_auth = auth; | ||
744 | cred->gc_base.cr_ops = &gss_credops; | 745 | cred->gc_base.cr_ops = &gss_credops; |
745 | cred->gc_base.cr_flags = RPCAUTH_CRED_NEW; | 746 | cred->gc_base.cr_flags = RPCAUTH_CRED_NEW; |
746 | cred->gc_service = gss_auth->service; | 747 | cred->gc_service = gss_auth->service; |