Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Dec 2000 23:31:04 +0000
From:      Brian Somers <brian@Awfulhak.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        Brian Somers <brian@Awfulhak.org>, Dag-Erling Smorgrav <des@ofug.org>, "David E. O'Brien" <obrien@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, brian@Awfulhak.org
Subject:   Re: cvs commit: src/etc crontab 
Message-ID:  <200012112331.eBBNV4449126@hak.lan.Awfulhak.org>
In-Reply-To: Message from Robert Watson <rwatson@FreeBSD.org>  of "Mon, 11 Dec 2000 09:45:46 EST." <Pine.NEB.3.96L.1001211094250.41424D-100000@fledge.watson.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> On Mon, 11 Dec 2000, Brian Somers wrote:
> 
> > And does ``lockf /var/run/periodic'' do the same thing ?
> 
> If the mode on /var/run/periodic is 0644 or 0755 or the like, yes.  Any
> user who can get an open file handle on a file system object can make use
> of advisory locking.  If you want to have a locking object that doesn't
> allow joe user to lock it, it needs to be appropriately protected by
> permissions.  The current standing proposal for periodic seems to be a
> /var/run/periodic.lock with mode 0600, owned by root.

I'm not sure if we're talking about the same thing here.  The file 
/var/run/periodic doesn't exist on any of my machines.  If I can 
just re-iterate my suggestion:

> > 1 3 * * * root lockf /var/run/periodic periodic daily
> > 1 3 * * 6 root lockf /var/run/periodic periodic weekly
> > 1 3 1 * * root lockf /var/run/periodic periodic monthly

Let's focus on that and not try to bring in any pre-existing files 
with magic permissions or new directories.  Are you suggesting that 
it doesn't work ?  (Hint: read lockf.c).

Sorry for sounding irritated - I've had a long day.

> However, for applications that generate their own lock files dynamically,
> it would be nice if they used /var/run/${appname}/lockfile as well as
> /var/run/${appname}/pidfile (or some variation on this theme).  This way
> as we break down use of root privilege, we don't have to break filename
> compatibility and all that.  This suggests that /var/run/periodic/lockfile
> or /var/periodic/lockfile would both be fine.

I don't think creating further directories is in any way 
advantageous.  What does this buy us ?  The above example works fine 
and indicates clearly that periodic is running.

I'm saying this in echo to my suggestion of adding /var/ppp (a few 
years ago) to contain multi-link ppp local domain sockets (for 
transferring file descriptors and link info between processes).  
There was a pretty much unanimous objection on the basis that 
creating new directories for every new type of file would end in 
tears - or at least too much (unnecessary) hierarchy.

> Robert N M Watson             FreeBSD Core Team, TrustedBSD Project
> robert@fledge.watson.org      NAI Labs, Safeport Network Services

-- 
Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012112331.eBBNV4449126>