NetBSD Problem Report #41252

From apb@cequrux.com  Mon Apr 20 16:16:21 2009
Return-Path: <apb@cequrux.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 56C9163BD8A
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 20 Apr 2009 16:16:21 +0000 (UTC)
Message-Id: <20090420161552.7C96FE930BA@apb-laptoy.apb.alt.za>
Date: Mon, 20 Apr 2009 16:15:52 +0000 (UTC)
From: apb@cequrux.com
To: gnats-bugs@gnats.NetBSD.org
Subject: named pid file has moved
X-Send-Pr-Version: 3.95

>Number:         41252
>Category:       bin
>Synopsis:       named pid file has moved
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 20 16:20:00 +0000 2009
>Last-Modified:  Sun Apr 26 01:10:02 +0000 2009
>Originator:     Alan Barrett
>Release:        NetBSD 5.99.11
>Organization:
Not much
>Environment:
System: NetBSD 5.99.11 i386
>Description:
	named(8) has changed the default location of its pid file,
	from /var/run/named.pid to /var/run/named/named.pid.

	/etc/rc.d/named does not know this.

        Due to chroot usage, the pid file is actually created
        in /var/chroot/named/var/run/named/named.pid,
        whereas the outer /var/run/named is a symlink to
        /var/chroot/named/var/run/named.pid.  This causes "/etc/rc.d/named
	stop" to be unable to stop the named process.

>How-To-Repeat:
	Code inspection
>Fix:
	One or more of the following:

	* Change the built-in default back to /var/run/named.pid.

	* Leave the built-in default as the incompatible new
	  value /var/run/named/named.pid, but provide

		options { pid-file "/var/run/named.pid"; }

	  in the default and sample named.conf files.

	* Adjust /etc/rc.d/named.conf to create the symlink as

	  /var/run/named.pid -> /var/chroot/named/var/run/named/named.pid

        * Document the change in src/doc/CHANGES and in release notes
          for the next version of NetBSD.

>Audit-Trail:
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: re: bin/41252: named pid file has moved
Date: Tue, 21 Apr 2009 02:33:56 +1000


    	* Change the built-in default back to /var/run/named.pid.


 yes please.


 .mrg.

From: christos@zoulas.com (Christos Zoulas)
To: matthew green <mrg@eterna.com.au>, gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: re: bin/41252: named pid file has moved
Date: Mon, 20 Apr 2009 12:59:51 -0400

 On Apr 21,  2:33am, mrg@eterna.com.au (matthew green) wrote:
 -- Subject: re: bin/41252: named pid file has moved

 |    
 |    	* Change the built-in default back to /var/run/named.pid.
 | 
 | 
 | yes please.
 | 
 | 
 | .mrg.

 The reason they changed this is:

 2486.   [func]          The default locations for named.pid and lwresd.pid
                         are now /var/run/named/named.pid and
                         /var/run/lwresd/lwresd.pid respectively.

                         This allows the owner of the containing directory
                         to be set, for "named -u" support, and allows there
                         to be a permanent symbolic link in the path, for
                         "named -t" support.  [RT #18306]

 christos

From: "Greg A. Woods" <woods@planix.com>
To: christos@zoulas.com (Christos Zoulas)
Cc: matthew green <mrg@eterna.com.au>,
	NetBSD GNATS <gnats-bugs@NetBSD.org>
Subject: Re: bin/41252: named pid file has moved
Date: Sat, 25 Apr 2009 21:09:28 -0400

 --pgp-sign-Multipart_Sat_Apr_25_21:09:28_2009-1
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable

 At Mon, 20 Apr 2009 12:59:51 -0400, christos@zoulas.com (Christos Zoulas) w=
 rote:
 Subject: re: bin/41252: named pid file has moved
 >=20
 > On Apr 21,  2:33am, mrg@eterna.com.au (matthew green) wrote:
 > -- Subject: re: bin/41252: named pid file has moved
 >=20
 > |   =20
 > |    	* Change the built-in default back to /var/run/named.pid.
 > |=20
 > |=20
 > | yes please.
 > |=20
 > |=20
 > | .mrg.
 >=20
 > The reason they changed this is:
 >=20
 > 2486.   [func]          The default locations for named.pid and lwresd.pid
 >                         are now /var/run/named/named.pid and
 >                         /var/run/lwresd/lwresd.pid respectively.
 >=20
 >                         This allows the owner of the containing directory
 >                         to be set, for "named -u" support, and allows the=
 re
 >                         to be a permanent symbolic link in the path, for
 >                         "named -t" support.  [RT #18306]

 Note that on NetBSD the PID files should _never_ be writable by anyone
 other than root.  The /etc/rc.d infrastructure trusts their content.

 Named should be fixed (once again) to create its PID file before
 changing its runtime user-ID and/or doing chroot.

 --=20
 						Greg A. Woods
 						Planix, Inc.

 <woods@planix.com>       +1 416 218-0099        http://www.planix.com/

 --pgp-sign-Multipart_Sat_Apr_25_21:09:28_2009-1
 Content-Type: application/pgp-signature
 Content-Transfer-Encoding: 7bit

 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.7 (NetBSD)

 iD8DBQBJ87RIZn1xt3i/9H8RAn9JAJ9auobOvme/SqPOjiI1G3CYETjXuQCfdeIg
 CBiM7cu04arI7cCC+B6YmsA=
 =39t/
 -----END PGP SIGNATURE-----

 --pgp-sign-Multipart_Sat_Apr_25_21:09:28_2009-1--

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.