summaryrefslogtreecommitdiffstats
path: root/sys/nfs/nfs_vfsops.c
diff options
context:
space:
mode:
authorthib <thib@openbsd.org>2007-06-20 15:00:43 +0000
committerthib <thib@openbsd.org>2007-06-20 15:00:43 +0000
commitcccd40303905ac57f2ff12ef497deef87b367517 (patch)
tree52ae5985ed2fdb399db933050773478090b45838 /sys/nfs/nfs_vfsops.c
parentadd ssio(4); (diff)
downloadwireguard-openbsd-cccd40303905ac57f2ff12ef497deef87b367517.tar.xz
wireguard-openbsd-cccd40303905ac57f2ff12ef497deef87b367517.zip
READDIRPLUS is v3 only, bail out if the mount isnt a v3.
Prevents weird things from happening. ok tedu@,pedro@
Diffstat (limited to 'sys/nfs/nfs_vfsops.c')
-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);