Commit fa08139d authored by J. Bruce Fields's avatar J. Bruce Fields

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: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 71423274
...@@ -605,12 +605,7 @@ nfsd4_create(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, ...@@ -605,12 +605,7 @@ nfsd4_create(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
fh_init(&resfh, NFS4_FHSIZE); fh_init(&resfh, NFS4_FHSIZE);
/* status = fh_verify(rqstp, &cstate->current_fh, S_IFDIR, NFSD_MAY_NOP);
* 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);
if (status) if (status)
return status; return status;
......
...@@ -1236,11 +1236,7 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, ...@@ -1236,11 +1236,7 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
if (isdotent(fname, flen)) if (isdotent(fname, flen))
return nfserr_exist; return nfserr_exist;
/* err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_NOP);
* 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);
if (err) if (err)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment