From ba9332f3740548a67b492edc581fd3abc1e73354 Mon Sep 17 00:00:00 2001 From: Constantine Sapuntzakis Date: Thu, 6 Aug 1998 23:38:40 +0000 Subject: Null mounts must be from directories --- sys/miscfs/nullfs/null_vfsops.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/miscfs') diff --git a/sys/miscfs/nullfs/null_vfsops.c b/sys/miscfs/nullfs/null_vfsops.c index 6b852d03915..5e641e3ad43 100644 --- a/sys/miscfs/nullfs/null_vfsops.c +++ b/sys/miscfs/nullfs/null_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: null_vfsops.c,v 1.8 1998/02/08 22:41:38 tholo Exp $ */ +/* $OpenBSD: null_vfsops.c,v 1.9 1998/08/06 23:38:39 csapuntz Exp $ */ /* $NetBSD: null_vfsops.c,v 1.11 1996/05/10 22:50:56 jtk Exp $ */ /* @@ -123,6 +123,11 @@ nullfs_mount(mp, path, data, ndp, p) vrele(ndp->ni_dvp); ndp->ni_dvp = NULL; + if (lowerrootvp->v_type != VDIR) { + vput(lowerrootvp); + return (EINVAL); + } + xmp = (struct null_mount *) malloc(sizeof(struct null_mount), M_UFSMNT, M_WAITOK); /* XXX */ -- cgit v1.2.3