chroot and bind-9.1.0

Josiane Tack Josiane.Tack at dstu.univ-montp2.fr
Thu Mar 1 15:58:06 UTC 2001


Hi,

I have just installed the bind-9.1.0 version on a 2.2 Kernel Linux. 
Now I am trying to chroot the daemon bind. I have well noted the 
compilation option "--disable-threads" that should allow me to use the 
 "-u" option of the "named" command, in order to switch to setuid when the 
daemon is launched.

During the bind compilation, I have used the option "--prefix=/path"
so as to define a new path where the bind distribution is installed 
with the prefix value " --prefix=/chroot/named".

I have also followed the instructions found in URL

http://www.losurs.org/docs/howto/Chroot-BIND.html
and mentioned by a user of this list. 

Anyway, I can not apply the compilation options concerning the path changes.
Indeed, I don't have any src/port/linux/Makefile.set
in my bind distribution (bind-9..1.0), as well as no DESTRUN variable 
in any Makefile. I suppose this URL reference concerns a previous (old) 
bind distribution  (bind-8 ?)...

When I run bind in chroot mode :

> daemon /chroot/named/sbin/named -u named -t /chroot/named -c /etc/named.conf

(/etc/named.conf being the relative path to the new root under chroot)

I have a problem to localise the directory /var/run, the error message is:

> Mar  1 10:27:20 firewall /chroot/named/sbin/named[8828]: couldn't open pid 
>file '/chroot/named/var/run/named.pid': No such file or directory


It seems to me that the bind daemon is looking for the named.pid file, 
in the directory:
/chroot/named/chroot/named/var/run/named.pid

The "-t /chroot/named" option allows to "named" to redefine the directory 
/chroot/named as root (which is logical).
But why does "named" look for the named.pid file into  ?
For this way, once the "-t /chroot/named" option is applyed, it adds (by 
default) /chroot/named to the path.

How can I solve this amiguity ? Which compilation option should I introduce 
into the configuration of bind ?

I thank you very much for your help

Josiane Tack

--------------------------------------------------------------------------------
Josiane Tack
ISTEEM - CC 049
Universite Montpellier II
Place Eugene Bataillon
34095 MONTPELLIER Cedex 05
Tel. 04.67.14.49.24 / Fax. 04.67.14.47.85
E-Mail: Josiane.Tack at dstu.univ-montp2.fr
--------------------------------------------------------------------------------



More information about the bind-users mailing list