summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2011-04-09 11:28:53 -0400
committerJ. Bruce Fields <bfields@redhat.com>2011-04-11 08:42:22 -0400
commit29a78a3ed7fc9c4ee49962751eb321b038c190a2 (patch)
tree88798f9c1a4247fa7de6bb7f698cbd47213895ac /fs/nfsd/nfs4proc.c
parent22b03214962ec2a9748abc9987fc2e66dec4626d (diff)
downloadop-kernel-dev-29a78a3ed7fc9c4ee49962751eb321b038c190a2.zip
op-kernel-dev-29a78a3ed7fc9c4ee49962751eb321b038c190a2.tar.gz
nfsd4: make fh_verify responsibility of nfsd_lookup_dentry caller
The secinfo caller actually won't want this. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 126b8f7..8059ada 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -762,6 +762,9 @@ nfsd4_secinfo(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
__be32 err;
fh_init(&resfh, NFS4_FHSIZE);
+ err = fh_verify(rqstp, &cstate->current_fh, S_IFDIR, NFSD_MAY_EXEC);
+ if (err)
+ return err;
err = nfsd_lookup_dentry(rqstp, &cstate->current_fh,
secinfo->si_name, secinfo->si_namelen,
&exp, &dentry);
OpenPOWER on IntegriCloud