summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-12-02 19:30:30 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2018-12-19 13:52:45 -0500
commitddf529eeed59184c49dcad1633c11831f822bf6b (patch)
treec648594f18928ae2897f01ade6ca8ef337cec46f /net/sunrpc/auth.c
parent1de7eea92946d7b581a8cd26084410913c80e594 (diff)
NFS: move credential expiry tracking out of SUNRPC into NFS.
NFS needs to know when a credential is about to expire so that it can modify write-back behaviour to finish the write inside the expiry time. It currently uses functions in SUNRPC code which make use of a fairly complex callback scheme and flags in the generic credientials. As I am working to discard the generic credentials, this has to change. This patch moves the logic into NFS, in part by finding and caching the low-level credential in the open_context. We then make direct cred-api calls on that. This makes the code much simpler and removes a dependency on generic rpc credentials. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/auth.c')
-rw-r--r--net/sunrpc/auth.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index 27d90578e7a0..cf23eed01b1c 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -360,29 +360,6 @@ out_nocache:
360} 360}
361EXPORT_SYMBOL_GPL(rpcauth_init_credcache); 361EXPORT_SYMBOL_GPL(rpcauth_init_credcache);
362 362
363/*
364 * Setup a credential key lifetime timeout notification
365 */
366int
367rpcauth_key_timeout_notify(struct rpc_auth *auth, struct rpc_cred *cred)
368{
369 if (!cred->cr_auth->au_ops->key_timeout)
370 return 0;
371 return cred->cr_auth->au_ops->key_timeout(auth, cred);
372}
373EXPORT_SYMBOL_GPL(rpcauth_key_timeout_notify);
374
375bool
376rpcauth_cred_key_to_expire(struct rpc_auth *auth, struct rpc_cred *cred)
377{
378 if (auth->au_flags & RPCAUTH_AUTH_NO_CRKEY_TIMEOUT)
379 return false;
380 if (!cred->cr_ops->crkey_to_expire)
381 return false;
382 return cred->cr_ops->crkey_to_expire(cred);
383}
384EXPORT_SYMBOL_GPL(rpcauth_cred_key_to_expire);
385
386char * 363char *
387rpcauth_stringify_acceptor(struct rpc_cred *cred) 364rpcauth_stringify_acceptor(struct rpc_cred *cred)
388{ 365{