From owner-freebsd-current Tue Oct 29 14:16:03 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA02016 for current-outgoing; Tue, 29 Oct 1996 14:16:03 -0800 (PST) Received: from Tomobiki-Cho.CAC.Washington.EDU (mel@tomobiki-cho.cac.washington.edu [128.95.135.58]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA01969 for ; Tue, 29 Oct 1996 14:15:57 -0800 (PST) Received: from localhost by Tomobiki-Cho.CAC.Washington.EDU (8.7.5/UW-NDC Revision: 2.28 ) id OAA14122; Tue, 29 Oct 1996 14:15:28 -0800 (PST) Date: Tue, 29 Oct 1996 13:59:27 -0800 (PST) From: Mark Crispin Subject: Re: /var/mail (was: re: Help, permission problems...) To: J Wunsch cc: roberto@keltia.freenix.fr, current@FreeBSD.org, scrappy@ki.net In-Reply-To: <199610291524.QAA05144@uriah.heep.sax.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 29 Oct 1996 16:24:44 +0100 (MET), J Wunsch wrote: > > c) fcntl() locking is not respected by many mail programs. Virtually > > all programs respect .lock files. > Except for mail.local, the basic mail deliverer in the first place. > Since all the locking is advisory, you are basically bound to what the > mail delivery tool uses. You've got no other choice. All the .lock > files will lock the various mail readers very fine -- but nobody uses > multiple mail readers simultaneously. The .lock files won't prevent > mail.local from delivering new mail -- hence they're useless. You still don't understand. Your "mail.local" is not the only mail delivery program, nor is it typical of mail delivery programs on UNIX. Most mail delivery programs use .lock files. Since all the locking is advisory, you are basically bound to what the mail delivery tool uses. You've got no other choice. All the flock() calls will lock some mail readers very fine. The flock calls() won't prevent the mail delivery program from delivering new mail -- hence they're useless. Mail readers are safe *ONLY* if they invoke *ALL* the known locks. The mail reader has no way of knowing what the local system mail delivery program uses. The mail reader has no way of knowing that an EACCES error from trying to create a .lock file means "don't use lock files" vs. "the protection of the mail spool is wrong". Do you understand yet? > but nobody uses > multiple mail readers simultaneously. You're also wrong about this. People *do* use multiple mail readers simultaneously. Perhaps the mail software that you use doesn't permit it, but not all software has that limitation. > > flock() locking does not work over NFS at all. > Only since our lockd is not yet ready. It is supposed to work with > NFS, too. So, FreeBSD is going to make the same mistake with the lockd kludge that SVR4 did?