From 8f5aed3be48f618b39bf9afa21fe1c26c3507d11 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Mon, 23 May 2005 12:25:33 +0000 Subject: [PATCH] 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. --- etc/rc.d/named | 8 ++------ 1 file 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