From owner-freebsd-current Thu Oct 4 13:19:32 2001 Delivered-To: freebsd-current@freebsd.org Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by hub.freebsd.org (Postfix) with ESMTP id CD4CB37B407 for ; Thu, 4 Oct 2001 13:19:27 -0700 (PDT) Received: from blossom.cjclark.org (dialup-209.245.132.25.Dial1.SanJose1.Level3.net [209.245.132.25]) by falcon.mail.pas.earthlink.net (8.11.5/8.9.3) with ESMTP id f94KJO602425; Thu, 4 Oct 2001 13:19:24 -0700 (PDT) Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.3) id f94KJJh01369; Thu, 4 Oct 2001 13:19:19 -0700 (PDT) (envelope-from cjc) Date: Thu, 4 Oct 2001 13:19:15 -0700 From: "Crist J. Clark" To: Leif Neland Cc: Jun Kuriyama , Bernd Walter , freebsd-current@FreeBSD.ORG Subject: Re: named pid file in /var/run/named/pid? Message-ID: <20011004131915.C297@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <7md743mtp2.wl@waterblue.imgsrc.co.jp> <20011004181305.B57424-100000@arnold.neland.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011004181305.B57424-100000@arnold.neland.dk>; from leifn@neland.dk on Thu, Oct 04, 2001 at 06:17:13PM +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 Thu, Oct 04, 2001 at 06:17:13PM +0200, Leif Neland wrote: > > > On Thu, 4 Oct 2001, Jun Kuriyama wrote: > > > At Thu, 4 Oct 2001 11:21:19 +0000 (UTC), > > Bernd Walter wrote: > > > I run an md based filesystem for /var/run so it is empty after startup. > > > Does that mean that I also need to take care of creating directories in > > > it during boot - and maintaining myself on every box. > > > Or it it the responsibility of the programms to enshure that the > > > directories they need are created? > > > > /var/run/named is created by mtree (/etc/mtree/BSD.var.dist). If you > > want to use md(4) for /var/run, you should make directory after > > /var/run creation. > > Is it possible to make the md-filesystem automatically make the needed > subdirectories, when a program wants to create > /var/run/a/very/deeply/nested/file ? 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. > Or would that just be too ugly, mixing device drivers with high-level file > operations? Guess so.. Yeah, that too. 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. -- 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