From owner-freebsd-current Thu Oct 4 15:34: 6 2001 Delivered-To: freebsd-current@freebsd.org Received: from harrier.mail.pas.earthlink.net (harrier.mail.pas.earthlink.net [207.217.121.12]) by hub.freebsd.org (Postfix) with ESMTP id B069C37B415 for ; Thu, 4 Oct 2001 15:33:41 -0700 (PDT) Received: from blossom.cjclark.org (dialup-209.245.132.25.Dial1.SanJose1.Level3.net [209.245.132.25]) by harrier.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id PAA16206; Thu, 4 Oct 2001 15:33:38 -0700 (PDT) Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.3) id f94MXZW02141; Thu, 4 Oct 2001 15:33:35 -0700 (PDT) (envelope-from cjc) Date: Thu, 4 Oct 2001 15:33:35 -0700 From: "Crist J. Clark" To: Bernd Walter Cc: Leif Neland , Jun Kuriyama , freebsd-current@FreeBSD.ORG Subject: Re: named pid file in /var/run/named/pid? Message-ID: <20011004153335.J297@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <7md743mtp2.wl@waterblue.imgsrc.co.jp> <20011004181305.B57424-100000@arnold.neland.dk> <20011004131915.C297@blossom.cjclark.org> <20011005000302.F3918@cicely20.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011005000302.F3918@cicely20.cicely.de>; from ticso@mail.cicely.de on Fri, Oct 05, 2001 at 12:03:02AM +0200 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Oct 05, 2001 at 12:03:02AM +0200, Bernd Walter wrote: > On Thu, Oct 04, 2001 at 01:19:15PM -0700, Crist J. Clark wrote: [snip] > > That wouldn't work. The whole point of /var/run/named is to set the > > permissions on the directory such that a non-root user (the 'bind' > > user in FreeBSD typically) can write files in the directory. In order > > to create the named directory in /var/run, you need root privs. Give > > that to the program, and we are back where we started, no point in > > using /var/run/named, just use /var/run. > > Named is startet under root rights and drop these later. > It has to be so otherwise it's not possible to open port 53 for listen. > So there is no great magic in creating the pid file in /var/run. > If that's a problem I consider it as a bug in named. You've never 'HUPped' a named running as non-root then. It will complain about not being able to write the pid file (not that it is a fatal problem). This is the reason for /var/run/named. [snip] > > It is not that big of a deal to hack this support for named into the > > rc scripts. It is a hassle when considering the "correct" way to > > handle this to make it extensible to other daemons we may wish to run > > in such a manner. > > The question is what is the correct way. It happens I've just been hacking around in /etc/rc where the clean-up of /var/run is done, and someone else mentioned mtree(8) in this thread (but in a different context). I think it would be easy enough to run mtree(8) right after /var/run is cleaned (and long after it would be mounted as an md(4)) to get it into good form. The problem reduces to maintaining the map file for this purpose. -- Crist J. Clark cjclark@alum.mit.edu cjclark@jhu.edu cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message