diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1998-08-06 23:38:40 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1998-08-06 23:38:40 +0000 |
commit | ba9332f3740548a67b492edc581fd3abc1e73354 (patch) | |
tree | 40272d040c813c153f1d7511d6f87dc8d7b78f5f /sys/miscfs/nullfs | |
parent | 9af34e12ce03c0974d99a18ec5dac4c7e1b77efb (diff) |
Null mounts must be from directories
Diffstat (limited to 'sys/miscfs/nullfs')
-rw-r--r-- | sys/miscfs/nullfs/null_vfsops.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 */ |