From: Andy Adamson Date: Wed, 14 Aug 2013 15:59:13 +0000 (-0400) Subject: SUNRPC: don't map EKEYEXPIRED to EACCES in call_refreshresult X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=5bad04d7bc7fe12a89b716f8b63d32b5735f6dd2;p=linux-edison.git SUNRPC: don't map EKEYEXPIRED to EACCES in call_refreshresult commit f1ff0c27fd9987c59d707cd1a6b6c1fc3ae0a250 upstream. The NFS layer needs to know when a key has expired. This change also returns -EKEYEXPIRED to the application, and the informative "Key has expired" error message is displayed. The user then knows that credential renewal is required. Signed-off-by: Andy Adamson Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 426f8fcc4c6..5b1bf7b530f 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1407,9 +1407,9 @@ call_refreshresult(struct rpc_task *task) return; case -ETIMEDOUT: rpc_delay(task, 3*HZ); - case -EKEYEXPIRED: case -EAGAIN: status = -EACCES; + case -EKEYEXPIRED: if (!task->tk_cred_retry) break; task->tk_cred_retry--;