summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2009-08-21 21:50:30 (GMT)
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-08-24 03:43:57 (GMT)
commit5eecfde615894dc1c2e3f85b515a96ae2e408fb5 (patch)
tree7bb8e5cb5b54b80181e5a433d71110f244d6037d /fs/nfs
parent405d8f8b1d936414da2093d4149ff790ff3f84a5 (diff)
downloadlinux-fsl-qoriq-5eecfde615894dc1c2e3f85b515a96ae2e408fb5.tar.xz
NFS: Handle a zero-length auth flavor list
Some releases of Linux rpc.mountd (nfs-utils 1.1.4 and later) return an empty auth flavor list if no sec= was specified for the export. This is notably broken server behavior. The new auth flavor list checking added in a recent commit rejects this case. The OpenSolaris client does too. The broken mountd implementation is already widely deployed. To avoid a behavioral regression, the kernel's mount client skips flavor checking (ie reverts to the pre-2.6.32 behavior) if mountd returns an empty flavor list. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/super.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 9c85cdb..f3a95df 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1338,6 +1338,16 @@ static int nfs_walk_authlist(struct nfs_parsed_mount_data *args,
unsigned int i, j, server_authlist_len = *(request->auth_flav_len);
/*
+ * Certain releases of Linux's mountd return an empty
+ * flavor list. To prevent behavioral regression with
+ * these servers (ie. rejecting mounts that used to
+ * succeed), revert to pre-2.6.32 behavior (no checking)
+ * if the returned flavor list is empty.
+ */
+ if (server_authlist_len == 0)
+ return 0;
+
+ /*
* We avoid sophisticated negotiating here, as there are
* plenty of cases where we can get it wrong, providing
* either too little or too much security.