aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@fys.uio.no>2005-01-04 21:39:27 +0100
committerTrond Myklebust <trond.myklebust@fys.uio.no>2005-01-04 21:39:27 +0100
commitaeca3b58e0591cd5cc114fcb6b1e488378bf40a9 (patch)
tree4fcd3b554ff17c4ead50e2999a1083990610a510 /net
parent640cdc0b740e07b2cb9acfc216fbd979c330a59e (diff)
downloadhistory-aeca3b58e0591cd5cc114fcb6b1e488378bf40a9.tar.gz
RPC: Instead of setting a flag (RPCAUTH_CRED_DEAD) in the cred to
indicate failure of an upcall to get a gss context for that cred, set the status of waiting tasks to indicate failure. This solves problems e.g. with creds with the CRED_DEAD flag set never being refreshed, which caused krb5 mounts to fail after the context used to do RENEWS expired. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c4
-rw-r--r--net/sunrpc/clnt.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 629bb0ecb7e288..e0df112ec10682 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -480,12 +480,14 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
if (!cred)
goto err;
if (gss_err)
- cred->cr_flags |= RPCAUTH_CRED_DEAD;
+ cred->cr_flags &= ~RPCAUTH_CRED_UPTODATE;
else
gss_cred_set_ctx(cred, ctx);
spin_lock(&gss_auth->lock);
gss_msg = __gss_find_upcall(gss_auth, acred.uid);
if (gss_msg) {
+ if (gss_err)
+ gss_msg->msg.errno = -EACCES;
__gss_unhash_msg(gss_msg);
spin_unlock(&gss_auth->lock);
gss_release_msg(gss_msg);
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 4f4cdb904bf378..cc31505ec2c7f1 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -928,7 +928,7 @@ call_refreshresult(struct rpc_task *task)
task->tk_action = call_reserve;
if (status >= 0 && rpcauth_uptodatecred(task))
return;
- if (rpcauth_deadcred(task)) {
+ if (status == -EACCES) {
rpc_exit(task, -EACCES);
return;
}