b51f668
Bugzilla: N/A
b51f668
Upstream-status: queued in NFS git tree (for 3.13/3.14?)
65bda0b
65bda0b
Currently, the client will attempt to use krb5i in the SETCLIENTID call
65bda0b
even if rpc.gssd isn't running. When that fails, it'll then fall back to
65bda0b
RPC_AUTH_UNIX. This introduced a delay when mounting if rpc.gssd isn't
65bda0b
running, and causes warning messages to pop up in the ring buffer.
65bda0b
65bda0b
Check to see if rpc.gssd is running before even attempting to use krb5i
65bda0b
auth, and just silently skip trying to do so if it isn't. In the event
65bda0b
that the admin is actually trying to mount with krb5*, it will still
65bda0b
fail at a later stage of the mount attempt.
65bda0b
65bda0b
Signed-off-by: Jeff Layton <jlayton@redhat.com>
65bda0b
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
65bda0b
---
65bda0b
 fs/nfs/nfs4client.c |    7 ++++++-
65bda0b
 1 files changed, 6 insertions(+), 1 deletions(-)
65bda0b
65bda0b
diff -up linux-3.11.9-200.fc19.x86_64/fs/nfs/nfs4client.c.orig linux-3.11.9-200.fc19.x86_64/fs/nfs/nfs4client.c
65bda0b
--- linux-3.11.9-200.fc19.x86_64/fs/nfs/nfs4client.c.orig	2013-09-02 16:46:10.000000000 -0400
65bda0b
+++ linux-3.11.9-200.fc19.x86_64/fs/nfs/nfs4client.c	2013-11-21 10:20:27.288286000 -0500
65bda0b
@@ -10,6 +10,7 @@
65bda0b
 #include <linux/sunrpc/auth.h>
65bda0b
 #include <linux/sunrpc/xprt.h>
65bda0b
 #include <linux/sunrpc/bc_xprt.h>
65bda0b
+#include <linux/sunrpc/rpc_pipe_fs.h>
65bda0b
 #include "internal.h"
65bda0b
 #include "callback.h"
65bda0b
 #include "delegation.h"
65bda0b
@@ -206,7 +207,11 @@ struct nfs_client *nfs4_init_client(stru
65bda0b
 	if (clp->cl_minorversion != 0)
65bda0b
 		__set_bit(NFS_CS_INFINITE_SLOTS, &clp->cl_flags);
65bda0b
 	__set_bit(NFS_CS_DISCRTRY, &clp->cl_flags);
65bda0b
-	error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_GSS_KRB5I);
65bda0b
+
65bda0b
+	error = -EINVAL;
65bda0b
+	if (gssd_running(clp->cl_net))
65bda0b
+		error = nfs_create_rpc_client(clp, timeparms,
65bda0b
+					      RPC_AUTH_GSS_KRB5I);
65bda0b
 	if (error == -EINVAL)
65bda0b
 		error = nfs_create_rpc_client(clp, timeparms, RPC_AUTH_UNIX);
65bda0b
 	if (error < 0)
65bda0b