Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1448699
| From | "J. Bruce Fields" <bfields@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 7/7] nfsd: drop unnecessary MAY_EXEC check from create |
| Date | 2016-07-22 20:00 +0200 |
| Message-ID | <rXMTU-xT-47@gated-at.bofh.it> (permalink) |
| References | <rXMKd-r1-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: "J. Bruce Fields" <bfields@redhat.com> 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> --- fs/nfsd/nfs4proc.c | 7 +------ fs/nfsd/vfs.c | 6 +----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 9d7e1edf0cca..1fb222752b2b 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 cd06c6511cfc..c844fd601381 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; -- 2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM Oleg Drokin <green@linuxhacker.ru> - 2016-07-21 22:40 +0200
Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM "J. Bruce Fields" <bfields@fieldses.org> - 2016-07-22 04:00 +0200
Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM Oleg Drokin <green@linuxhacker.ru> - 2016-07-22 08:40 +0200
Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM "J. Bruce Fields" <bfields@fieldses.org> - 2016-07-22 13:00 +0200
Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM Oleg Drokin <green@linuxhacker.ru> - 2016-07-22 17:20 +0200
Re: [PATCH] nfsd: Make creates return EEXIST correctly instead of EPERM "J. Bruce Fields" <bfields@redhat.com> - 2016-07-22 20:00 +0200
[PATCH 6/7] nfsd: clean up bad-type check in nfsd_create_locked "J. Bruce Fields" <bfields@redhat.com> - 2016-07-22 20:00 +0200
[PATCH 1/7] nfsd: Make creates return EEXIST instead of EACCES "J. Bruce Fields" <bfields@redhat.com> - 2016-07-22 20:00 +0200
[PATCH 7/7] nfsd: drop unnecessary MAY_EXEC check from create "J. Bruce Fields" <bfields@redhat.com> - 2016-07-22 20:00 +0200
csiph-web