Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Jan 2015 21:21:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 196449] New: dns/nsd Problem with pidfile in chrooted environment
Message-ID:  <bug-196449-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org
          Reporter: adam@zaleski.org
                CC: jaap@NLnetLabs.nl
             Flags: maintainer-feedback?(jaap@NLnetLabs.nl)
                CC: jaap@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@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@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@FreeBSD.org> ---
Maintainer CC'd

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-196449-13>