summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2005-05-23 12:25:33 +0000
committerpjd <pjd@FreeBSD.org>2005-05-23 12:25:33 +0000
commit56ad93da865201d9cb58e89d6296f5c103d06ce6 (patch)
treef378facb0247272dad335f636e57cdea0b2b56be /etc
parentdeef27817392c0224a59290bc480fb3cea88d591 (diff)
downloadFreeBSD-src-56ad93da865201d9cb58e89d6296f5c103d06ce6.zip
FreeBSD-src-56ad93da865201d9cb58e89d6296f5c103d06ce6.tar.gz
We need to use 'applyset' command for devfs, 'apply hide' is not enough,
because new devfs entries can show up later and one can access such entires from inside named chroot. In rc.d scripts we can use devfs_domount() function with devfsrules_hide_all policy and unhide 'null' and 'random' manually.
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.d/named8
1 files changed, 2 insertions, 6 deletions
diff --git a/etc/rc.d/named b/etc/rc.d/named
index 039820d..2b91396 100755
--- a/etc/rc.d/named
+++ b/etc/rc.d/named
@@ -58,12 +58,8 @@ chroot_autoupdate()
# Mount a devfs in the chroot directory if needed
#
- if [ ! -c ${named_chrootdir}/dev/random -o \
- ! -c ${named_chrootdir}/dev/null ]; then
- umount ${named_chrootdir}/dev 2>/dev/null
- mount_devfs devfs ${named_chrootdir}/dev
- fi
- devfs -m ${named_chrootdir}/dev rule apply hide
+ umount ${named_chrootdir}/dev 2>/dev/null
+ devfs_domount ${named_chrootdir}/dev devfsrules_hide_all
devfs -m ${named_chrootdir}/dev rule apply path null unhide
devfs -m ${named_chrootdir}/dev rule apply path random unhide
OpenPOWER on IntegriCloud