12-14-05 11:01 PM
On Tuesday 13 December 2005 22:05, Mark Andrews <Mark_Andrews@isc.org> wrote:
>
>
> Stupid idiotic defaults for named in SELinux.
>
> Mark
> --
> Mark Andrews, ISC
> 1 Seymour St., Dundas Valley, NSW 2117, Australia
> PHONE: +61 2 9871 4742 INTERNET: Mark_Andrews@isc.org
>
>
>
Yes, as mentioned by Mark, this issue is caused by Red Hat's
terrific SELinux named security features, which remove the
need to run BIND in a chroot environment.
You need to ensure that your configuration files are located
where the SELinux policy expects to find them .
If you have bind-chroot installed, $ROOTDIR will be set in
/etc/sysconfig/named.
The SELinux policy expects to find the named configuration files here:
Location: Context (shown by ls -Z):
$ROOTDIR/etc/{named.conf,rndc.*} system_u:object_r:named_conf_t
$ROOTDIR/var/named{,/*} system_u:object_r:named_zone_t
$ROOTDIR/var/named/data{,/*} system_u:object_r:named_cache_t
$ROOTDIR/var/named/slaves{,/*} system_u:object_r:named_cache_t
If your files do not have the contexts as shown above, do:
# restorecon -R /etc /var/named
Check your named.conf 'options { directory ... };" setting to ensure
your zone files are in the locations expected by SELinux.
If you really want to put configuration files in a different location,
use
# chcon system_u:object_r:named_zone_t $my_zone_files
or
# chcon system_u:object_r:named_conf_t $my_conf_files
Named is allowed to write to named_cache_t files, but not to
named_zone_t or named_conf_t files by the SELinux policy. If
you have dynamically updateable or slave zone files, put them
in $ROOTDIR/var/named/slaves .
You can tell SELinux to allow zone file writes by setting the
tunable boolean 'named_write_master_zones' in
/etc/selinux/targeted/booleans .
If you've any further issues with using BIND on RHEL-4, please
raise a bugzilla:
https://bugzilla.redhat.com/bugzill...&component=bind
and I'll do my best to resolve them.
Thanks & Regards
Jason Vas Dias
Red Hat BIND package maintainer
Red Hat Inc.
[ Post a follow-up to this message ]
|