diff mbox

[Version,5,1/5] SUNRPC: don't map EKEYEXPIRED to EACCES in call_refreshresult

Message ID 1376495957-7482-2-git-send-email-andros@netapp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Adamson Aug. 14, 2013, 3:59 p.m. UTC
From: Andy Adamson <andros@netapp.com>

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 <andros@netapp.com>
---
 net/sunrpc/clnt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Trond Myklebust Sept. 3, 2013, 4:07 p.m. UTC | #1
On Wed, 2013-08-14 at 11:59 -0400, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>

> 

> 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 <andros@netapp.com>

> ---

>  net/sunrpc/clnt.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c

> index ecbc4e3..b544965 100644

> --- a/net/sunrpc/clnt.c

> +++ b/net/sunrpc/clnt.c

> @@ -1423,9 +1423,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--;


Applied.

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com
diff mbox

Patch

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index ecbc4e3..b544965 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1423,9 +1423,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--;