Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Oct 1996 13:59:27 -0800 (PST)
From:      Mark Crispin <MRC@CAC.Washington.EDU>
To:        J Wunsch <j@uriah.heep.sax.de>
Cc:        roberto@keltia.freenix.fr, current@FreeBSD.org, scrappy@ki.net
Subject:   Re: /var/mail (was: re: Help, permission problems...)
Message-ID:  <MailManager.846626367.13515.mrc@Tomobiki-Cho.CAC.Washington.EDU>
In-Reply-To: <199610291524.QAA05144@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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?




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