From owner-freebsd-hackers Mon May 27 21:18: 9 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mta5.snfc21.pbi.net (mta5.snfc21.pbi.net [206.13.28.241]) by hub.freebsd.org (Postfix) with ESMTP id BFF4C37B401; Mon, 27 May 2002 21:18:05 -0700 (PDT) Received: from kokeb.ambesa.net ([64.172.25.224]) by mta5.snfc21.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GWS00I0YZY5S9@mta5.snfc21.pbi.net>; Mon, 27 May 2002 21:18:05 -0700 (PDT) Received: from kokeb.ambesa.net (localhost [127.0.0.1]) by kokeb.ambesa.net (8.12.3/8.12.3) with ESMTP id g4S4NHlq065688; Mon, 27 May 2002 21:23:17 -0700 (PDT envelope-from makonnen@pacbell.net) Received: (from mikem@localhost) by kokeb.ambesa.net (8.12.3/8.12.3/Submit) id g4S4NDRD065687; Mon, 27 May 2002 21:23:13 -0700 (PDT) Date: Mon, 27 May 2002 22:23:13 -0600 From: Mike Makonnen Subject: Re: non-root /var/run files (was Re: Sendmail, smmsp, and pid file) In-reply-to: <15602.35609.352674.838016@horsey.gshapiro.net> To: Gregory Neil Shapiro Cc: pjklist@ekahuna.com, freebsd-hackers@FreeBSD.ORG Message-id: <1022559793.742.34.camel@kokeb.ambesa.net> MIME-version: 1.0 X-Mailer: Evolution/1.0.2 Content-type: text/plain Content-transfer-encoding: 7BIT References: <20020527081026.B29438@zardoc.esmtp.org> <20020527185439041.AAA472%empty1.ekahuna.com@pc02.ekahuna.com> <15602.35609.352674.838016@horsey.gshapiro.net> X-Authentication-warning: kokeb.ambesa.net: mikem set sender to makonnen@pacbell.net using -f Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 2002-05-27 at 13:38, Gregory Neil Shapiro wrote: > pjklist> Funny thing about that, I actually created a /var/run/named directory > pjklist> for just the purpose of running named in a 'sandbox', chowned the > pjklist> directory bind:bind, and because I forgot to set the pid file path in > pjklist> named.conf, I see that it seems to write named.pid (owned by > pjklist> bind:bind) into /var/run without a problem. > > For named, the initial creation isn't the problem, it's the reloads and > restarts: > > # ndc reload > Reload initiated. > # tail -2 /var/log/messages > May 27 12:36:35 horsey named[142]: couldn't create pid file '/var/run/named.pid' > May 27 12:36:35 horsey named[142]: Ready to answer queries. named(8) starts up as root, but demotes itself and chroots to the sandbox immediately after reading the command line. I assume it creates the pid file as soon as it starts up, before it processes its arguments. Using ndc isn't a problem if you use the -c option to point it to the correct socket. Cheers, Mike Makonnen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message