procmail
[Top] [All Lists]

Re: Lockfiles are a lousy mechanism for write protection

2004-08-06 07:48:35
On Thu, 05 Aug 2004 18:35:48 -0600, Justin Gombos 
<mindfuq(_at_)zianet(_dot_)com> wrote:
* R A Lichtensteiger <rali(_at_)tifosi(_dot_)com> [2004-08-05 16:33]:

In fact, invoking a lock on a file IS declaring to the OS that there
may be only one process writing to the file.

I thought the OS could not care less if there is a lockfile present,
and if a malicious or ill-configured process decides to write to a
file that already has a producer, the OS won't object.  Isn't that
correct?

It's correct without a lock file.

Even if the OS knows about lockfiles and prevents it, it's silly to
open and write a new file solely for the purpose of setting a flag,
when the file at issue could contain a flag, which only requires a
file read.

So it makes more sense to intentionally munge the file?  You're new to
this whole *nix thing, aren't you?

Someone mentioned OpenVMS.. but I'm not familiar w/ that OS.  Is it
anything like VAX?

VMS is a OS, VAX is a machine that runs VMS.

I'm still at a loss for why kernel locks are ineffective over network
shares.  If the file is protected at the OS level, a redundant write
coming over the network still requires OS interaction, and should
still be blocked.

Because the kernel lock has to tell the kernel on the OTHER END the
file is locked.  That can be tricky.  Or impossib


-- 
gkreme at gmail or kreme at kreme or syth at mac
 :: Don't get saucy with me, Bernaise ::

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail