summaryrefslogtreecommitdiffstats
path: root/bind-chroot-admin.in
diff options
context:
space:
mode:
Diffstat (limited to 'bind-chroot-admin.in')
-rw-r--r--bind-chroot-admin.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/bind-chroot-admin.in b/bind-chroot-admin.in
index 59f50e2..3a431d4 100644
--- a/bind-chroot-admin.in
+++ b/bind-chroot-admin.in
@@ -97,6 +97,11 @@ function check_dirs()
[ ! -e "${BIND_CHROOT_PREFIX}/etc/localtime" ] && [ -e /etc/localtime ] && /bin/cp -fp /etc/localtime "${BIND_CHROOT_PREFIX}/etc/localtime";
/bin/chown --preserve-root root:named "${BIND_CHROOT_PREFIX}"/dev/{random,null,zero};
/bin/chmod --preserve-root 660 "${BIND_CHROOT_PREFIX}"/dev/{random,null,zero};
+ if selinux_enabled && [ -x /sbin/restorecon ]; then
+ for dev in random zero null; do
+ /sbin/restorecon ${BIND_CHROOT_PREFIX}/dev/$dev;
+ done
+ fi;
}
check_dirs;
@@ -259,8 +264,7 @@ function sync_files()
chmod 770 ${pfx}/var/named/{data/*/.,slaves/*/.,dynamic/*/.} >/dev/null 2>&1;
if [ -e $changed ]; then
if selinux_enabled && [ -x /sbin/restorecon ]; then
-# XXX Do not restorecon ${chroot}/dev/*, done in initscript (#431202)
- /sbin/restorecon -R ${BIND_CHROOT_PREFIX}/{etc,var} >/dev/null 2>&1;
+ /sbin/restorecon -R ${BIND_CHROOT_PREFIX}/{dev,etc,var} >/dev/null 2>&1;
/sbin/restorecon /etc/named.* >/dev/null 2>&1;
/sbin/restorecon /etc/rndc.key >/dev/null 2>&1;
/sbin/restorecon /etc/rndc.conf >/dev/null 2>&1;