summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_subs.c
diff options
context:
space:
mode:
authorassar <assar@cvs.openbsd.org>2000-02-07 04:57:20 +0000
committerassar <assar@cvs.openbsd.org>2000-02-07 04:57:20 +0000
commit6f7e6bffc9d5d686eb1bdf9b027266f64db28754 (patch)
tree1b456f9a4be5902545c6b6f0805e173ab4dc3195 /sys/nfs/nfs_subs.c
parent3510e94919e26ce8c81fffcb220fc932c7d4aeb3 (diff)
update to use new checkexp vfs operation
Diffstat (limited to 'sys/nfs/nfs_subs.c')
-rw-r--r--sys/nfs/nfs_subs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index f4c6a736892..2c54e7632a6 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.27 1999/04/28 09:28:17 art Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.28 2000/02/07 04:57:17 assar Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -1690,7 +1690,7 @@ nfsm_srvfattr(nfsd, vap, fp)
/*
* nfsrv_fhtovp() - convert a fh to a vnode ptr (optionally locked)
* - look up fsid in mount list (if not found ret error)
- * - get vp and export rights by calling VFS_FHTOVP()
+ * - get vp and export rights by calling VFS_FHTOVP() and VFS_CHECKEXP()
* - if cred->cr_uid == 0 or MNT_EXPORTANON set it to credanon
* - if not lockflag unlock it with VOP_UNLOCK()
*/
@@ -1717,7 +1717,10 @@ nfsrv_fhtovp(fhp, lockflag, vpp, cred, slp, nam, rdonlyp, kerbflag)
if (!mp)
return (ESTALE);
- error = VFS_FHTOVP(mp, &fhp->fh_fid, nam, vpp, &exflags, &credanon);
+ error = VFS_CHECKEXP(mp, nam, &exflags, &credanon);
+ if (error)
+ return (error);
+ error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp);
if (error)
return (error);