diff options
author | Kevin Coffman <kwc@citi.umich.edu> | 2007-11-09 18:42:04 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-11-17 13:08:45 -0500 |
commit | ffc40f569272b6be60c66441aeae79a686ff54d9 (patch) | |
tree | 1158008abba8849353d1da11ce66d762f4838df5 /net | |
parent | b09b9417d074e01a4e4ab5c19358f1b3dc76c1b2 (diff) |
sunrpc: gss_pipe_downcall(), don't assume all errors are transient
Instead of mapping all errors except EACCES to EAGAIN, map all errors
except EAGAIN to EACCES.
An example is user-land negotiating a Kerberos context with an encryption
type that is not supported by the kernel code. (This can happen due to
mis-configuration or a bug in the Kerberos code that does not honor our
request to limit the encryption types negotiated.) This failure is not
transient, and returning EAGAIN causes mount to continuously retry rather
than giving up.
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 53995af9ca4b..c42362c33944 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -540,7 +540,7 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) | |||
540 | p = gss_fill_context(p, end, ctx, gss_msg->auth->mech); | 540 | p = gss_fill_context(p, end, ctx, gss_msg->auth->mech); |
541 | if (IS_ERR(p)) { | 541 | if (IS_ERR(p)) { |
542 | err = PTR_ERR(p); | 542 | err = PTR_ERR(p); |
543 | gss_msg->msg.errno = (err == -EACCES) ? -EACCES : -EAGAIN; | 543 | gss_msg->msg.errno = (err == -EAGAIN) ? -EAGAIN : -EACCES; |
544 | goto err_release_msg; | 544 | goto err_release_msg; |
545 | } | 545 | } |
546 | gss_msg->ctx = gss_get_ctx(ctx); | 546 | gss_msg->ctx = gss_get_ctx(ctx); |