From nobody@FreeBSD.ORG  Mon Oct 16 21:17:12 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 9FC9F37B4F9; Mon, 16 Oct 2000 21:17:12 -0700 (PDT)
Message-Id: <20001017041712.9FC9F37B4F9@hub.freebsd.org>
Date: Mon, 16 Oct 2000 21:17:12 -0700 (PDT)
From: david@mu.org
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: Default location of named.pid file assumes named is running as root
X-Send-Pr-Version: www-1.0

>Number:         22038
>Category:       conf
>Synopsis:       Default location of named.pid file assumes named is running as root
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 16 21:20:01 PDT 2000
>Closed-Date:    Tue Jun 19 08:30:19 PDT 2001
>Last-Modified:  Tue Jun 19 08:33:06 PDT 2001
>Originator:     David Drum
>Release:        4.1-STABLE
>Organization:
The Paul Saab Fan Club
>Environment:
FreeBSD gladden.mouseplanet.com 4.1-STABLE FreeBSD 4.1-STABLE #2: Tue Sep 5 05:11:37 CDT 2000     root@gladden.mouseplanet.com:/usr/src/sys/compile/GLADDEN  i386
>Description:
Default location for named's pid file is /var/run, which is owned by root.  This conflicts with named when it is launched with -u bind.  Named is able to create /var/run/named.pid at startup, but generates an error upon "ndc reload":
named[113]: couldn't create pid file '/var/run/named.pid'

>How-To-Repeat:
Set up named to run "-u bind".  Run named.  Run "ndc reload".  tail /var/log/messages
>Fix:
Move the pid file into a subdirectory that can be chowned to bind:

*** Makefile.inc.orig	Mon Oct 16 23:09:11 2000
--- Makefile.inc	Mon Oct 16 23:09:27 2000
***************
*** 9,15 ****
  VER!=		cat ${BIND_DIR}/Version
  
  PS=		ps
! PIDDIR=		/var/run
  DESTETC=	/etc/namedb
  DESTEXEC=	/usr/libexec
  DESTRUN=	/var/run
--- 9,15 ----
  VER!=		cat ${BIND_DIR}/Version
  
  PS=		ps
! PIDDIR=		/var/run/named
  DESTETC=	/etc/namedb
  DESTEXEC=	/usr/libexec
  DESTRUN=	/var/run


>Release-Note:
>Audit-Trail:

From: Andy Farkas <andyf@speednet.com.au>
To: david@mu.org
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: conf/22038: Default location of named.pid file assumes named is
 running as root
Date: Tue, 17 Oct 2000 16:42:06 +1100 (EST)

 > Move the pid file into a subdirectory that can be chowned to bind:
 
 I like this idea.
 
 --
  
  :{ andyf@speednet.com.au
   
         Andy Farkas
     System Administrator
    Speednet Communications
  http://www.speednet.com.au/
   
 
 
 

From: Dag-Erling Smorgrav <des@ofug.org>
To: david@mu.org
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: conf/22038: Default location of named.pid file assumes named is running as root
Date: 17 Oct 2000 10:33:15 +0200

 david@mu.org writes:
 > Move the pid file into a subdirectory that can be chowned to bind:
 
 This does not help if named runs chrooted, which it should.
 
 (I have patches to make it run in a jail, BTW)
 
 DES
 -- 
 Dag-Erling Smorgrav - des@ofug.org
 

From: David Malone <dwmalone@maths.tcd.ie>
To: david@mu.org
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: conf/22038: Default location of named.pid file assumes named is running as root
Date: Tue, 17 Oct 2000 09:59:51 +0100

 On Mon, Oct 16, 2000 at 09:17:12PM -0700, david@mu.org wrote:
 
 [Your message containted some very long lines, so I wrapped them]
 
 > Default location for named's pid file is /var/run, which is owned
 > by root.  This conflicts with named when it is launched with -u
 > bind.  Named is able to create /var/run/named.pid at startup, but
 > generates an error upon "ndc reload":
 
 According to the docs you can tell named where to put it's pid file
 by adding:
 
 	pid-file "/var/run/named/named.pid";
 
 to the "options" section of the config file. Changig the default
 location of the PID file is a bad idea as it will break lots of
 local scripts people have written. Is this option OK for what you
 want?
 
 (Bind docs are in /usr/src/contrib/bind/doc/)
 
 	David.
 
State-Changed-From-To: open->feedback 
State-Changed-By: dd 
State-Changed-When: Mon Jun 18 17:10:42 PDT 2001 
State-Changed-Why:  
As dwmalone asked, is the run-time option okay for what you wanted? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=22038 
State-Changed-From-To: feedback->closed 
State-Changed-By: dwmalone 
State-Changed-When: Tue Jun 19 08:30:19 PDT 2001 
State-Changed-Why:  
Runtime directive is OK for relocating pid file. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=22038 
>Unformatted:
