aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/auth.h
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 /include/linux/sunrpc/auth.h
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 'include/linux/sunrpc/auth.h')
-rw-r--r--include/linux/sunrpc/auth.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index 28b34c740c43..0bdc2f4957ff 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -37,17 +37,9 @@
37 37
38struct rpcsec_gss_info; 38struct rpcsec_gss_info;
39 39
40/* auth_cred ac_flags bits */
41enum {
42 RPC_CRED_KEY_EXPIRE_SOON = 1, /* underlying cred key will expire soon */
43 RPC_CRED_NOTIFY_TIMEOUT = 2, /* nofity generic cred when underlying
44 key will expire soon */
45};
46
47struct auth_cred { 40struct auth_cred {
48 const struct cred *cred; 41 const struct cred *cred;
49 const char *principal; /* If present, this is a machine credential */ 42 const char *principal; /* If present, this is a machine credential */
50 unsigned long ac_flags;
51}; 43};
52 44
53/* 45/*
@@ -154,7 +146,6 @@ struct rpc_credops {
154 int (*crunwrap_resp)(struct rpc_task *, kxdrdproc_t, 146 int (*crunwrap_resp)(struct rpc_task *, kxdrdproc_t,
155 void *, __be32 *, void *); 147 void *, __be32 *, void *);
156 int (*crkey_timeout)(struct rpc_cred *); 148 int (*crkey_timeout)(struct rpc_cred *);
157 bool (*crkey_to_expire)(struct rpc_cred *);
158 char * (*crstringify_acceptor)(struct rpc_cred *); 149 char * (*crstringify_acceptor)(struct rpc_cred *);
159 bool (*crneed_reencode)(struct rpc_task *); 150 bool (*crneed_reencode)(struct rpc_task *);
160}; 151};
@@ -198,9 +189,6 @@ int rpcauth_uptodatecred(struct rpc_task *);
198int rpcauth_init_credcache(struct rpc_auth *); 189int rpcauth_init_credcache(struct rpc_auth *);
199void rpcauth_destroy_credcache(struct rpc_auth *); 190void rpcauth_destroy_credcache(struct rpc_auth *);
200void rpcauth_clear_credcache(struct rpc_cred_cache *); 191void rpcauth_clear_credcache(struct rpc_cred_cache *);
201int rpcauth_key_timeout_notify(struct rpc_auth *,
202 struct rpc_cred *);
203bool rpcauth_cred_key_to_expire(struct rpc_auth *, struct rpc_cred *);
204char * rpcauth_stringify_acceptor(struct rpc_cred *); 192char * rpcauth_stringify_acceptor(struct rpc_cred *);
205 193
206static inline 194static inline