From: <andros@netapp.com>
To: <trond.myklebust@primarydata.com>
Cc: <linux-nfs@vger.kernel.org>, Andy Adamson <andros@netapp.com>
Subject: [PATCH 1/1] NFS: try RPC_AUTH_GSS_KRB5 after RPC_AUTH_GSS_KRB5I for cl_rpcclient
Date: Wed, 17 Dec 2014 13:47:23 -0500 [thread overview]
Message-ID: <1418842043-15074-2-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1418842043-15074-1-git-send-email-andros@netapp.com>
From: Andy Adamson <andros@netapp.com>
Some servers implement KRB5 but not KRB5I. With out this patch, said servers
will use AUTH_UNIX for state creation, even when exporting a volume with krb5.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4state.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 5194933..a56ad3f 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2063,6 +2063,21 @@ again:
nfs4_root_machine_cred(clp);
goto again;
}
+ if (clnt->cl_auth->au_flavor == RPC_AUTH_GSS_KRB5I) {
+ clnt = rpc_clone_client_set_auth(clnt, RPC_AUTH_GSS_KRB5);
+ if (IS_ERR(clnt)) {
+ status = PTR_ERR(clnt);
+ break;
+ }
+ /* Note: this is safe because we haven't yet marked the
+ * client as ready, so we are the only user of
+ * clp->cl_rpcclient
+ */
+ clnt = xchg(&clp->cl_rpcclient, clnt);
+ rpc_shutdown_client(clnt);
+ clnt = clp->cl_rpcclient;
+ goto again;
+ }
if (clnt->cl_auth->au_flavor == RPC_AUTH_UNIX)
break;
case -NFS4ERR_CLID_INUSE:
--
1.8.3.1
prev parent reply other threads:[~2014-12-17 18:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 18:47 [PATCH 0/1] NFS: try RPC_AUTH_GSS_KRB5 after RPC_AUTH_GSS_KRB5I for cl_rpcclient andros
2014-12-17 18:47 ` andros [this message]
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=1418842043-15074-2-git-send-email-andros@netapp.com \
--to=andros@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.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