summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2016-07-21 16:00:12 -0400
committerJ. Bruce Fields <bfields@redhat.com>2016-08-04 17:11:52 -0400
commitfa08139d5e02838ccabd9dcde22663d3b6780cad (patch)
treea7889d475555d0a593a536322de8d536dc772232
parent71423274498169911bf9eedf02d5e7ac0a083801 (diff)
downloadop-kernel-dev-fa08139d5e02838ccabd9dcde22663d3b6780cad.zip
op-kernel-dev-fa08139d5e02838ccabd9dcde22663d3b6780cad.tar.gz
nfsd: drop unnecessary MAY_EXEC check from create
We need an fh_verify to make sure we at least have a dentry, but actual permission checks happen later. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--fs/nfsd/nfs4proc.c7
-rw-r--r--fs/nfsd/vfs.c6
2 files changed, 2 insertions, 11 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 9d7e1ed..1fb2227 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -605,12 +605,7 @@ nfsd4_create(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
fh_init(&resfh, NFS4_FHSIZE);
- /*
- * We just check that parent is accessible here, nfsd_* do their
- * own access permission checks
- */
- status = fh_verify(rqstp, &cstate->current_fh, S_IFDIR,
- NFSD_MAY_EXEC);
+ status = fh_verify(rqstp, &cstate->current_fh, S_IFDIR, NFSD_MAY_NOP);
if (status)
return status;
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 1809624..6666188 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1236,11 +1236,7 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
if (isdotent(fname, flen))
return nfserr_exist;
- /*
- * Even though it is a create, first let's see if we are even allowed
- * to peek inside the parent
- */
- err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC);
+ err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_NOP);
if (err)
return err;
OpenPOWER on IntegriCloud