Date: Mon, 11 Aug 2008 04:03:18 -0700 (PDT) From: "Ronald F.Guilmette" <rfg@tristatelogic.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/126452: Ownership of ${named_chrootdir}/etc/namedb set wrong Message-ID: <20080811110318.D87D4BDC53@segfault.tristatelogic.com> Resent-Message-ID: <200808111110.m7BBA2hq049785@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 126452 >Category: ports >Synopsis: Ownership of ${named_chrootdir}/etc/namedb set wrong >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 11 11:10:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Ronald F. Guilmette >Release: FreeBSD 7.0-RELEASE i386 >Organization: Infinite Monkeys & Co. LLC >Environment: System: FreeBSD 7.0-RELEASE Package: bind95-base-9.5.0.2 >Description: In a default/standard install of the bind95-base-9.5.0.2 port, the "variable" files (such as zone files) will get stashed into the /var/named/etc/namedb directory, and whenever named is started up, the /etc/rc.d/named script will create a symlink from /etc/namedb to /var/named/etc/namedb. Ordinarily, in the named.conf file the "directory" option will be set to "/etc/namedb", thus making the /var/named/etc/namedb directory the "home" directory for the named process. Unfortunately. in a standard/default/un-customized install of the bind95-base-9.5.0.2 port, the /var/named/etc/namedb directory gets its ownership set to "root" rather than to whatever "named_uid" is defined to within /etc/defaults/rc.conf (i.e. "bind"). This subsequently causes the named process to be unable to write into what it considers its own "home" directory... and it will complain about that by writing the following error into its default logging file/channel, e.g. each time a subsequent "rndc reload" is performed: the working directory is not writable >How-To-Repeat: su root portinstall bind95 {{edit the named.conf file and set the "default" logging channel to log to some specific file}} rndc reload {{look at the contents named's "default" log file to see the error}} >Fix: The install procedure for the bind95 port should create the directory /var/named/etc/namedb with ownership set to the same userID as is defined for the named_uid variable in the /etc/defaults/rc.conf file (i.e. "bind"). Changing the ownership of /var/named/etc/namedb to be the same UID as whatever UID named will actually (subsequently) be run under will allow named to write into its "working directory" and will make it stop complaining that it can't. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080811110318.D87D4BDC53>