From: Trond Myklebust NFS: Ensure NFSv2/v3 mounts respect the NFS_MOUNT_SECFLAVOUR flag Date: Thu, 03 Aug 2006 10:21:56 -0400 Subject: No Subject Message-Id: <1154614916.5774.6.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Signed-off-by: Trond Myklebust --- fs/nfs/super.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 867b5dc..d744f63 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -471,9 +471,10 @@ static int nfs_validate_mount_data(struc data->version); return -EINVAL; } - /* Fill in pseudoflavor for mount version < 5 */ - data->pseudoflavor = RPC_AUTH_UNIX; case 5: + /* Set the pseudoflavor */ + if (!(data->flags & NFS_MOUNT_SECFLAVOUR)) + data->pseudoflavor = RPC_AUTH_UNIX; memset(data->context, 0, sizeof(data->context)); }