From: Chuck Lever <chuck.lever@oracle.com>
To: trond.myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>,
Bryan Schumaker <bjschuma@netapp.com>
Subject: [PATCH v1 10/15] NFS: Handle missing rpc.gssd when looking up root FH
Date: Sat, 16 Mar 2013 15:55:36 -0400 [thread overview]
Message-ID: <20130316195536.27329.83797.stgit@seurat.1015granger.net> (raw)
In-Reply-To: <20130316195044.27329.11666.stgit@seurat.1015granger.net>
When rpc.gssd is not running, any NFS operation that needs to use a
GSS security flavor of course does not work.
If looking up a server's root file handle results in an
NFS4ERR_WRONGSEC, nfs4_find_root_sec() is called to try a bunch of
security flavors until one works or all reasonable flavors have
been tried. When rpc.gssd isn't running, this loop seems to fail
immediately after rpcauth_create() craps out on the first GSS
flavor.
When the rpcauth_create() call in nfs4_lookup_root_sec() fails
because rpc.gssd is not available, nfs4_lookup_root_sec()
unconditionally returns -EIO. This prevents nfs4_find_root_sec()
from retrying any other flavors; it drops out of its loop and fails
immediately.
Having nfs4_lookup_root_sec() return -EACCES instead allows
nfs4_find_root_sec() to try all flavors in its list.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Bryan Schumaker <bjschuma@netapp.com>
---
fs/nfs/nfs4proc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index b2671cb..c05e78b 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2443,7 +2443,7 @@ static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandl
auth = rpcauth_create(flavor, server->client);
if (IS_ERR(auth)) {
- ret = -EIO;
+ ret = -EACCES;
goto out;
}
ret = nfs4_lookup_root(server, fhandle, info);
next prev parent reply other threads:[~2013-03-16 19:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-16 19:54 [PATCH v1 00/15] Security flavor negotiation fixes Chuck Lever
2013-03-16 19:54 ` [PATCH v1 01/15] SUNRPC: Missing module alias for auth_rpcgss.ko Chuck Lever
2013-03-16 19:54 ` [PATCH v1 02/15] NFS: Remove unneeded forward declaration Chuck Lever
2013-03-16 19:54 ` [PATCH v1 03/15] SUNRPC: Define rpcsec_gss_info structure Chuck Lever
2013-03-16 19:54 ` [PATCH v1 04/15] SUNRPC: Introduce rpcauth_get_pseudoflavor() Chuck Lever
2013-03-16 19:54 ` [PATCH v1 05/15] SUNRPC: Load GSS kernel module by OID Chuck Lever
2013-03-16 19:55 ` [PATCH v1 06/15] SUNRPC: Consider qop when looking up pseudoflavors Chuck Lever
2013-03-16 19:55 ` [PATCH v1 08/15] SUNRPC: Make gss_mech_get() static Chuck Lever
2013-03-16 19:55 ` [PATCH v1 09/15] SUNRPC: Remove EXPORT_SYMBOL_GPL() from GSS mech switch Chuck Lever
2013-03-16 19:55 ` Chuck Lever [this message]
2013-03-16 19:55 ` [PATCH v1 11/15] NFS: Clean up nfs4_proc_get_rootfh Chuck Lever
2013-03-16 19:55 ` [PATCH v1 12/15] NFS: Avoid PUTROOTFH when managing leases Chuck Lever
2013-03-16 19:56 ` [PATCH v1 13/15] NFS: Use static list of security flavors during root FH lookup recovery Chuck Lever
2013-03-16 19:56 ` [PATCH v1 14/15] NFS: Try AUTH_UNIX when PUTROOTFH gets NFS4ERR_WRONGSEC Chuck Lever
2013-03-16 19:56 ` [PATCH v1 15/15] NFS: Use "krb5i" to establish NFSv4 state whenever possible Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130316195536.27329.83797.stgit@seurat.1015granger.net \
--to=chuck.lever@oracle.com \
--cc=bjschuma@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@netapp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).