summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-24 02:40:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-24 02:40:13 +0000
commit0d490441d61d42e943f5720c76ea834d11b87c07 (patch)
tree4e8bd5ad5949ef99273d59a234a57a79e37460da /sys/kern
parent6d121436d4d1b3a9a9425ebdb4937fe247679627 (diff)
no mknod in chroot
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_autoconf.c4
-rw-r--r--sys/kern/vfs_syscalls.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c
index ca7ffc2c2fc..85ebc5f042e 100644
--- a/sys/kern/subr_autoconf.c
+++ b/sys/kern/subr_autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_autoconf.c,v 1.11 1996/08/15 12:33:20 niklas Exp $ */
+/* $OpenBSD: subr_autoconf.c,v 1.12 1996/09/24 02:40:11 deraadt Exp $ */
/* $NetBSD: subr_autoconf.c,v 1.21 1996/04/04 06:06:18 cgd Exp $ */
/*
@@ -264,7 +264,7 @@ config_rootsearch(fn, rootname, aux)
return (m.match);
}
-static char *msgs[3] = { "", " not configured\n", " unsupported\n" };
+char *msgs[3] = { "", " not configured\n", " unsupported\n" };
/*
* The given `aux' argument describes a device that has been found
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 518dd912abf..127fcdbade8 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.13 1996/09/24 02:38:30 deraadt Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.14 1996/09/24 02:40:12 deraadt Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -841,6 +841,8 @@ sys_mknod(p, v, retval)
if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
return (error);
+ if (p->p_fd->fd_rdir)
+ return (EINVAL);
NDINIT(&nd, CREATE, LOCKPARENT, UIO_USERSPACE, SCARG(uap, path), p);
if ((error = namei(&nd)) != 0)
return (error);