*BSD News Article 15514


Return to BSD News archive

Xref: sserve comp.unix.bsd:11950 comp.mail.misc:10664
Newsgroups: comp.unix.bsd,comp.mail.misc
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!convex!convex!cs.utexas.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!destroyer!cs.ubc.ca!unixg.ubc.ca!kakwa.ucs.ualberta.ca!acs.ucalgary.ca!cpsc.ucalgary.ca!xenlink!fsa.ca!deraadt
From: deraadt@fsa.ca (Theo de Raadt)
Subject: Re: mailbox locking
In-Reply-To: conklin@kaleida.com's message of 28 Apr 93 12: 18:20
Message-ID: <DERAADT.93Apr29121043@newt.fsa.ca>
Sender: news@fsa.ca
Nntp-Posting-Host: newt.fsa.ca
Organization: little lizard city
References: <CONKLIN.93Apr28121820@ngai.kaleida.com>
Date: Thu, 29 Apr 1993 19:10:43 GMT
Lines: 31

In article <CONKLIN.93Apr28121820@ngai.kaleida.com> conklin@kaleida.com (J.T. Conklin) writes:
>  If I'm not mistaken, BSD once used a lock file to mail the mailbox.
> 386BSD's mail.local uses kernel locks only.
>
> I've heard that using locking kernel locks over NFS has been
> problematic.  Have those problems been fixed, or should I avoid
> networked mail directories?

Yes, this is a problem. I myself feel that username.lock files should
still be used for locking since
	1) NFS is the usual case when this is needed, and there isn't a
	   public rpc.lockd (any volunteers? I didn't think so :-)
	2) as recent posts indicate, the NET2 lockf() system call has a
	   few "problems".
	3) Interoperability with mail agents on sunos and ultrix and
	   other operating systems would be nice.

I don't have a machine here that I can confirm with, but I suspect
that SVR4 (the kitchen sink unix implimentation) would use BOTH
varieties of locks for completeness (yuck). I don't advocate that
though.

At least on Sunos (probably also with NET2?), there is also the
problem where /usr/ucb/Mail will loop forever (with SIGINT redirected)
trying to create a lock file, forcing the user to type ^Z and kill %%.
The lock files aren't perfect, but then, neither is rpc.lockd (nor
will it ever).
 <tdr.
--

This space not left unintentionally unblank.		deraadt@fsa.ca