Commit aeca3b58 authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@fys.uio.no>
parent 640cdc0b
......@@ -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);
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment