]> err.no Git - linux-2.6/commitdiff
NFS: Ensure NFSv2/v3 mounts respect the NFS_MOUNT_SECFLAVOUR flag
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 23 Aug 2006 00:06:14 +0000 (20:06 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 23 Sep 2006 03:24:38 +0000 (23:24 -0400)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/super.c

index 867b5dcd3a40a878d725b16d39c0a23d95dfe8ac..97cfb143e09fe507aa01039b30d0b53653ef2e5d 100644 (file)
@@ -471,12 +471,14 @@ static int nfs_validate_mount_data(struct nfs_mount_data *data,
                                                data->version);
                                return -EINVAL;
                        }
-                       /* Fill in pseudoflavor for mount version < 5 */
-                       data->pseudoflavor = RPC_AUTH_UNIX;
                case 5:
                        memset(data->context, 0, sizeof(data->context));
        }
 
+       /* Set the pseudoflavor */
+       if (!(data->flags & NFS_MOUNT_SECFLAVOUR))
+               data->pseudoflavor = RPC_AUTH_UNIX;
+
 #ifndef CONFIG_NFS_V3
        /* If NFSv3 is not compiled in, return -EPROTONOSUPPORT */
        if (data->flags & NFS_MOUNT_VER3) {