summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-07-09 21:35:17 +0000
committerphk <phk@FreeBSD.org>1999-07-09 21:35:17 +0000
commitf4278e671154b26810ecc718df2225808e6aa41f (patch)
treeca3ebe7b75e098bf320252e3a9b7dfaa99434e29 /etc
parent841e6146104ee63540d46ecf4bcf9a3a632a25f5 (diff)
downloadFreeBSD-src-f4278e671154b26810ecc718df2225808e6aa41f.zip
FreeBSD-src-f4278e671154b26810ecc718df2225808e6aa41f.tar.gz
Add a pseudo target called "jail" which DTRT for a jail(2)'ed /dev
Diffstat (limited to 'etc')
-rw-r--r--etc/MAKEDEV11
-rw-r--r--etc/etc.i386/MAKEDEV11
2 files changed, 20 insertions, 2 deletions
diff --git a/etc/MAKEDEV b/etc/MAKEDEV
index 35cf1e0..8875bb4 100644
--- a/etc/MAKEDEV
+++ b/etc/MAKEDEV
@@ -24,6 +24,7 @@
# Device "make" file. Valid arguments:
# all makes all known devices, standard number of units (or close)
# std standard devices
+# jail suitable for a jail(8)
# local configuration specific devices
# mach-4 mach4&lites+devices for Mach's XFree86 distribution
# (see http://www.cs.hut.fi/lites.html for more info on LITES)
@@ -129,7 +130,7 @@
# ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth)
# kbd keyboard devices
#
-# $Id: MAKEDEV,v 1.203 1999/07/09 12:52:02 sheldonh Exp $
+# $Id: MAKEDEV,v 1.204 1999/07/09 13:37:58 sheldonh Exp $
#
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
@@ -267,6 +268,14 @@ std)
chmod 666 fd/*
;;
+jail)
+ sh MAKEDEV std pty0
+ rm mem kmem drum pci io klog # for security
+ ln -sf null mem # for libkvm (ab)users
+ ln -sf null kmem # --//--
+ ln -sf null drum # --//--
+ ;;
+
mach-4)
mknod iopl c 22 0
mknod kbd c 23 0
diff --git a/etc/etc.i386/MAKEDEV b/etc/etc.i386/MAKEDEV
index 35cf1e0..8875bb4 100644
--- a/etc/etc.i386/MAKEDEV
+++ b/etc/etc.i386/MAKEDEV
@@ -24,6 +24,7 @@
# Device "make" file. Valid arguments:
# all makes all known devices, standard number of units (or close)
# std standard devices
+# jail suitable for a jail(8)
# local configuration specific devices
# mach-4 mach4&lites+devices for Mach's XFree86 distribution
# (see http://www.cs.hut.fi/lites.html for more info on LITES)
@@ -129,7 +130,7 @@
# ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth)
# kbd keyboard devices
#
-# $Id: MAKEDEV,v 1.203 1999/07/09 12:52:02 sheldonh Exp $
+# $Id: MAKEDEV,v 1.204 1999/07/09 13:37:58 sheldonh Exp $
#
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
@@ -267,6 +268,14 @@ std)
chmod 666 fd/*
;;
+jail)
+ sh MAKEDEV std pty0
+ rm mem kmem drum pci io klog # for security
+ ln -sf null mem # for libkvm (ab)users
+ ln -sf null kmem # --//--
+ ln -sf null drum # --//--
+ ;;
+
mach-4)
mknod iopl c 22 0
mknod kbd c 23 0
OpenPOWER on IntegriCloud