aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-09-07 17:49:05 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-09-07 17:52:42 -0400
commit41d058c3ba7bd16c3a91b9ec4d89fb6e7d4b4316 (patch)
tree80900e3b227b98a56e6220e86763361765be1b16 /fs
parent5e6b19901b763f502e62b5fd4f583778df983ce7 (diff)
NFSv4: Disallow security negotiation for lookups when 'sec=' is specified
Ensure that nfs4_proc_lookup_common respects the NFS_MOUNT_SECFLAVOUR flag. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 68551ea0b673..122b9340e6ef 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3154,7 +3154,9 @@ static int nfs4_proc_lookup_common(struct rpc_clnt **clnt, struct inode *dir,
3154 err = -EPERM; 3154 err = -EPERM;
3155 if (client != *clnt) 3155 if (client != *clnt)
3156 goto out; 3156 goto out;
3157 3157 /* No security negotiation if the user specified 'sec=' */
3158 if (NFS_SERVER(dir)->flags & NFS_MOUNT_SECFLAVOUR)
3159 goto out;
3158 client = nfs4_create_sec_client(client, dir, name); 3160 client = nfs4_create_sec_client(client, dir, name);
3159 if (IS_ERR(client)) 3161 if (IS_ERR(client))
3160 return PTR_ERR(client); 3162 return PTR_ERR(client);