aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2005-05-23 12:25:33 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2005-05-23 12:25:33 +0000
commit8f5aed3be48f618b39bf9afa21fe1c26c3507d11 (patch)
treef378facb0247272dad335f636e57cdea0b2b56be /etc
parent14bf9dc9bc36f1a989a5e90e8981686fd8c29bd9 (diff)
downloadsrc-8f5aed3be48f618b39bf9afa21fe1c26c3507d11.tar.gz
src-8f5aed3be48f618b39bf9afa21fe1c26c3507d11.zip
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.
Notes
Notes: svn path=/head/; revision=146537
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 039820d42e8b..2b91396a896b 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