From owner-cvs-all Mon Dec 11 15:30:20 2000 From owner-cvs-all@FreeBSD.ORG Mon Dec 11 15:30:15 2000 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from Awfulhak.org (awfulhak.demon.co.uk [194.222.196.252]) by hub.freebsd.org (Postfix) with ESMTP id 27C3237B402; Mon, 11 Dec 2000 15:30:13 -0800 (PST) Received: from hak.lan.Awfulhak.org (root@hak.lan.awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.1/8.11.1) with ESMTP id eBBNSQH22470; Mon, 11 Dec 2000 23:28:26 GMT (envelope-from brian@lan.awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.1/8.11.1) with ESMTP id eBBNV4449126; Mon, 11 Dec 2000 23:31:04 GMT (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200012112331.eBBNV4449126@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Robert Watson Cc: Brian Somers , Dag-Erling Smorgrav , "David E. O'Brien" , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, brian@Awfulhak.org Subject: Re: cvs commit: src/etc crontab In-Reply-To: Message from Robert Watson of "Mon, 11 Dec 2000 09:45:46 EST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 11 Dec 2000 23:31:04 +0000 From: Brian Somers Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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 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