projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e6b199
)
NFSv4: Disallow security negotiation for lookups when 'sec=' is specified
author
Trond Myklebust
<Trond.Myklebust@netapp.com>
Sat, 7 Sep 2013 21:49:05 +0000
(17:49 -0400)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Sat, 7 Sep 2013 21:52:42 +0000
(17:52 -0400)
Ensure that nfs4_proc_lookup_common respects the NFS_MOUNT_SECFLAVOUR
flag.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/nfs/nfs4proc.c
b/fs/nfs/nfs4proc.c
index 68551ea0b673de367900034761022e587a35e352..122b9340e6efe0a7253f74884eb98054454565b2 100644
(file)
--- 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,
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);