linux-sg2042/include/linux/sunrpc
Andy Adamson 4de6caa270 SUNRPC new rpc_credops to test credential expiry
This patch provides the RPC layer helper functions to allow NFS to manage
data in the face of expired credentials - such as avoiding buffered WRITEs
and COMMITs when the gss context will expire before the WRITEs are flushed
and COMMITs are sent.

These helper functions enable checking the expiration of an underlying
credential key for a generic rpc credential, e.g. the gss_cred gss context
gc_expiry which for Kerberos is set to the remaining TGT lifetime.

A new rpc_authops key_timeout is only defined for the generic auth.
A new rpc_credops crkey_to_expire is only defined for the generic cred.
A new rpc_credops crkey_timeout is only defined for the gss cred.

Set a credential key expiry watermark, RPC_KEY_EXPIRE_TIMEO set to 240 seconds
as a default and can be set via a module parameter as we need to ensure there
is time for any dirty data to be flushed.

If key_timeout is called on a credential with an underlying credential key that
will expire within watermark seconds, we set the RPC_CRED_KEY_EXPIRE_SOON
flag in the generic_cred acred so that the NFS layer can clean up prior to
key expiration.

Checking a generic credential's underlying credential involves a cred lookup.
To avoid this lookup in the normal case when the underlying credential has
a key that is valid (before the watermark), a notify flag is set in
the generic credential the first time the key_timeout is called. The
generic credential then stops checking the underlying credential key expiry, and
the underlying credential (gss_cred) match routine then checks the key
expiration upon each normal use and sets a flag in the associated generic
credential only when the key expiration is within the watermark.
This in turn signals the generic credential key_timeout to perform the extra
credential lookup thereafter.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2013-09-03 15:25:08 -04:00
..
addr.h sunrpc: move address copy/cmp/convert routines and prototypes from clnt.h to addr.h 2013-02-05 09:41:14 -05:00
auth.h SUNRPC new rpc_credops to test credential expiry 2013-09-03 15:25:08 -04:00
auth_gss.h SUNRPC: Clean up the RPCSEC_GSS service ticket requests 2012-01-05 10:42:38 -05:00
bc_xprt.h SUNRPC: Fix a few sparse warnings 2012-03-11 19:30:02 -04:00
cache.h net/sunrpc: xpt_auth_cache should be ignored when expired. 2013-07-01 17:53:28 -04:00
clnt.h SUNRPC: Remove the rpc_client->cl_dentry 2013-09-01 11:12:42 -04:00
debug.h UAPI: (Scripted) Disintegrate include/linux/sunrpc 2012-10-09 09:49:04 +01:00
gss_api.h svcrpc: store gss mech in svc_cred 2013-07-01 17:23:06 -04:00
gss_asn1.h
gss_err.h
gss_krb5.h
gss_krb5_enctypes.h
metrics.h NFS: include filelayout DS rpc stats in mountstats 2012-02-17 13:39:47 -05:00
msg_prot.h nfsd4: check backchannel attributes on create_session 2013-04-09 16:53:56 -04:00
rpc_pipe_fs.h SUNRPC: Add a helper to allow sharing of rpc_pipefs directory objects 2013-09-01 11:12:43 -04:00
rpc_rdma.h
sched.h SUNRPC: Remove unused functions rpc_task_set/has_priority 2013-06-06 16:24:40 -04:00
stats.h SUNRPC: constify the rpc_program 2012-01-31 19:28:20 -05:00
svc.h sunrpc: Fix lockd sleeping until timeout 2013-01-23 18:17:39 -05:00
svc_rdma.h svcrdma: silence a Sparse warning 2012-03-06 18:13:33 -05:00
svc_xprt.h svcrpc: make svc_xprt_received static 2012-08-21 17:42:01 -04:00
svcauth.h svcrpc: store gss mech in svc_cred 2013-07-01 17:23:06 -04:00
svcauth_gss.h nfsd4: move principal name into svc_cred 2012-05-31 20:29:55 -04:00
svcsock.h svcrpc: track rpc data length separately from sk_tcplen 2012-12-04 07:49:14 -05:00
timer.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
types.h
xdr.h sunrpc: trim off trailing checksum before returning decrypted or integrity authenticated buffer 2013-02-08 15:19:10 -05:00
xprt.h SUNRPC: allow disabling idle timeout 2013-04-26 11:41:26 -04:00
xprtrdma.h
xprtsock.h SUNRPC: Fix a few sparse warnings 2012-03-11 19:30:02 -04:00