Bug 88636

Summary: handbook instruction could shut down named
Product: Documentation Reporter: Yasholomew Yashinski <yashy>
Component: Books & ArticlesAssignee: Tom Rhodes <trhodes>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Yasholomew Yashinski 2005-11-08 02:30:12 UTC
From http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-dns.html

Arrange to have named start and chroot itself to the sandbox by adding the following to /etc/rc.conf:

named_enable="YES"
named_flags="-u bind -g bind -t /etc/namedb /etc/named.conf"

from "man named":
   -g     Run  the  server  in  the  foreground  and  force all logging to
              stderr.
    -c config-file
              Use  config-file  as  the  configuration  file  instead  of  the
              default, /etc/namedb/named.conf. To ensure  that  reloading  the
              configuration  file  continues  to  work  after  the  server has
              changed its working directory due to  to  a  possible  directory
              option in the configuration file, config-file should be an abso-
              lute pathname.

Fix: 

the rc.conf entry should read:
named_enable="YES"
named_flags="-u bind -t /etc/namedb -c /etc/named.conf"

I've had to make several other changes to get named to run:

# mkdir /var/named/etc/namedb/var/run/named/
# chown -R bind /var/named/etc/namedb/var

diff named.conf*
11,12d10
< include "./rndc.key";
< 
14c12
<       directory       "/";
---
>       directory       "/etc/namedb";

I would also suggest that 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-bind9.html
should be completely integrated into the previous page, as the majority of 
this page is simply duplication of the former page.
How-To-Repeat: 	Use instructions from the handbook
Comment 1 Siebrand.Mazeland 2005-12-16 12:43:23 UTC
This issue should be docs/ instead of www/
Comment 2 Remko Lodder freebsd_committer freebsd_triage 2005-12-16 12:58:20 UTC
Responsible Changed
From-To: freebsd-www->freebsd-doc

Correct the assign group as Siebrand mentioned.
Comment 3 Remko Lodder freebsd_committer freebsd_triage 2005-12-19 21:43:14 UTC
Responsible Changed
From-To: freebsd-doc->trhodes

In collaboration with Tom assign this to him. He will work on this 
when there is time.
Comment 4 Maxim Konovalov 2006-04-14 16:30:59 UTC
Hi Yasholomew,

The problem is that "25.6 Domain Name System" chapter describes
named(8) setup on RELENG_4.  There is BIND 8.3.7-REL and its -g flag
means process gid.  Next, it does have -c <config file> flag but can
be used without it.  So the example in the handbook is valid.

In the other hand "25.7 BIND9 and FreeBSD" describes BIND9 on
RELENG_5.

It is very hard (actually impossible) to make a cross-version guide
for BIND8 and BIND9 and I suggest to leave these chapter as is until
we drop support for RELENG_4 branch completely.

-- 
Maxim Konovalov
Comment 5 Tom Rhodes freebsd_committer freebsd_triage 2006-10-07 11:52:41 UTC
State Changed
From-To: open->closed
Comment 6 Tom Rhodes freebsd_committer freebsd_triage 2006-10-07 11:53:58 UTC
State Changed
From-To: closed->open

Re-open, my bad.
Comment 7 Tom Rhodes freebsd_committer freebsd_triage 2006-10-13 11:19:56 UTC
State Changed
From-To: open->closed

Late closing, the handbook has been updated to cover BIND9. 
Thanks for alerting us to the problem.