named changes in FreeBSD 7.3

In FreeBSD 7.2 the following rc.conf entries worked find:
Code:
named_enable="YES"
named_flags="-c /etc/named.conf"
named_chrootdir="/usr/home/bind"

This started up without any problems.

With the release of FreeBSD-7.3, the -c option has been assigned its own variable. I didn't think much of it and just made the change:
Code:
named_enable="YES"
named_conf="/etc/named.conf"
named_chrootdir="/usr/home/bind"

This bombs out with the following error:
Code:
server# /etc/rc.d/named start
/etc/rc.d/named: WARNING: /etc/named.conf is not readable.

I've been going over the rc.d/named script for a couple of hours now and I can't figure out why I'm getting this error or how to fix it.

Does anyone have a suggestion?

P.S. The following direct command runs fine:
Code:
/usr/sbin/named -u bind -c /etc/named.conf -t /usr/home/bind
 
My guess would be on the permissions of the named.conf file and who owns what. It's probably something to do with what user the rc.d script is executed as(root) and then forked of to(bind). I'm not to familiar with named, but my first try with this kind of error is to set the named.conf file to readable by all and see if that makes any difference.
 
gilinko said:
My guess would be on the permissions of the named.conf file and who owns what. It's probably something to do with what user the rc.d script is executed as(root) and then forked of to(bind). I'm not to familiar with named, but my first try with this kind of error is to set the named.conf file to readable by all and see if that makes any difference.

The file is world readable.

I think I found the cause. The script attempts to create a symlink outside the chroot that parallels the directories inside the chroot. In my case that directory is /etc. This fails because I already have a /etc. So I'm forced to manually create symlinks for every single config sitting in /usr/home/bind/etc. I also had to manually create the symlink for my pid file for the same reason.

Only after this would the rc.d script play nice with these settings:
Code:
named_enable="YES"
named_conf="/etc/named.conf"
named_chrootdir="/usr/home/bind/"
named_pidfile="/var/run/named.pid"

My only question remaining now is... How did this work without all these symlinks in FreeBSD 7.2?
 
Back
Top