提交 41d058c3 编写于 作者: T Trond Myklebust

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: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 5e6b1990
......@@ -3154,7 +3154,9 @@ static int nfs4_proc_lookup_common(struct rpc_clnt **clnt, struct inode *dir,
err = -EPERM;
if (client != *clnt)
goto out;
/* No security negotiation if the user specified 'sec=' */
if (NFS_SERVER(dir)->flags & NFS_MOUNT_SECFLAVOUR)
goto out;
client = nfs4_create_sec_client(client, dir, name);
if (IS_ERR(client))
return PTR_ERR(client);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册