[Bug 196449] New: dns/nsd Problem with pidfile in chrooted environment

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Jan 2 21:21:08 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196449

            Bug ID: 196449
           Summary: dns/nsd Problem with pidfile in chrooted environment
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: adam at zaleski.org
                CC: jaap at NLnetLabs.nl
             Flags: maintainer-feedback?(jaap at NLnetLabs.nl)
                CC: jaap at NLnetLabs.nl

Hello

There is a problem with dns/nsd startup script. 
This script reads pidfile location from configfile.
However if NSD is started in chrooted environemnent
then startup script can't locate pidfile and stop the daemon.

I tried to configure pidfile location to /var/run/nsd in nsd.conf
and then created this directory under relative path to chroot directory 
but it didn't help as  nsd-checkconf checks whether pidfile is 
relative to chroot or no:

[root at ns348344 ~]# /usr/local/sbin/nsd-checkconf -o pidfile
/usr/local/etc/nsd/nsd.conf
/usr/local/etc/nsd/nsd.conf: pidfile /var/run/nsd/nsd.pid is not relative to
chroot /usr/local/etc/nsd/.
/usr/local/etc/nsd/nsd.conf: 1 semantic errors in 1 zones, 1 keys.
[root at ns348344 ~]#

The best would be read to variable from config if chroot is in use  by issuing
/usr/local/sbin/nsd-checkconf -o chroot /usr/local/etc/nsd/nsd.conf
and then concatenate this path to pidfile location to get the real path.


Also I found out that removing pidfile variable from startup script solves the
problem and pidfiles are automatically discovered. It seems that /etc/rc.subr
does some magic over that.

--- Comment #1 from Bugzilla Automation <bugzilla at FreeBSD.org> ---
Maintainer CC'd

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list