summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@fys.uio.no>2003-01-12 21:41:44 -0800
committerLinus Torvalds <torvalds@penguin.transmeta.com>2003-01-12 21:41:44 -0800
commita4419dbb2a96b112350b114019ef540763e0d120 (patch)
tree6ea0b577c1eed4654025c025f2823d3a493d125a /include
parent8d188768b6a1b5692994c02539c801aad888b555 (diff)
[PATCH] RPCSEC_GSS client upcall user [5/6]
This patches the RPCSEC_GSS client to make use of the upcall mechanism that was provided by patch [3/6]. If an RPC task presents a non-uptodate credential to call_refresh(), a user daemon is contacted by means of a dedicated rpc_pipefs pipe. The daemon is then fed the uid for which it must establish a new RPCSEC security context. While the daemon goes about its business, the RPC task is put to sleep on a wait queue in order to allow the 'rpciod' process to service other requests. If another task wants to use the same credential, it too will be put to sleep once it reaches call_refresh(). A timeout mechanism ensures that requests are retried (or that 'soft' mounts fail) if the daemon crashes / is killed. Once the daemon has established the RPCSEC context, it writes the result back to the pipe, causing the credential to be updated. Those RPC tasks that were sleeping on the context are automatically woken up, and their execution can proceed.
Diffstat (limited to 'include')
-rw-r--r--include/linux/sunrpc/auth.h1
-rw-r--r--include/linux/sunrpc/auth_gss.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
index 4d466e9a4c64..a1ed52af2895 100644
--- a/include/linux/sunrpc/auth.h
+++ b/include/linux/sunrpc/auth.h
@@ -115,6 +115,7 @@ int rpcauth_register(struct rpc_authops *);
int rpcauth_unregister(struct rpc_authops *);
struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *);
void rpcauth_destroy(struct rpc_auth *);
+struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int);
struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int);
struct rpc_cred * rpcauth_bindcred(struct rpc_task *);
void rpcauth_holdcred(struct rpc_task *);
diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h
index 6f23b9d9ce07..1006c4fd6a99 100644
--- a/include/linux/sunrpc/auth_gss.h
+++ b/include/linux/sunrpc/auth_gss.h
@@ -71,6 +71,7 @@ struct rpc_gss_init_res {
* the wire when communicating with a server. */
struct gss_cl_ctx {
+ atomic_t count;
u32 gc_proc;
u32 gc_seq;
spinlock_t gc_seq_lock;