summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2007-06-20 15:00:44 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2007-06-20 15:00:44 +0000
commitb20202e3f1dd379b458c573b5a5e104622f573d2 (patch)
tree83555adf106854eb6a7c6d22f4d0a8fd6043a514 /sys
parent2adb82d5a02f524d16f89f13146640bef39a3164 (diff)
READDIRPLUS is v3 only, bail out if the mount isnt a v3.
Prevents weird things from happening. ok tedu@,pedro@
Diffstat (limited to 'sys')
-rw-r--r--sys/nfs/nfs_vfsops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index 6a975bfd909..06b2abd7af2 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vfsops.c,v 1.65 2007/06/13 18:05:27 thib Exp $ */
+/* $OpenBSD: nfs_vfsops.c,v 1.66 2007/06/20 15:00:43 thib Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */
/*
@@ -608,6 +608,9 @@ nfs_mount(mp, path, data, ndp, p)
if (error)
return (error);
+ if ((args.flags & (NFSMNT_NFSV3|NFSMNT_RDIRPLUS)) == NFSMNT_RDIRPLUS)
+ return (EINVAL);
+
if (nfs_niothreads < 0) {
nfs_niothreads = 4;
nfs_getset_niothreads(TRUE);