EXCL without CREAT

Rick Lindsley richl at lumiere.UUCP
Thu Jan 9 04:33:58 AEST 1986


In article <7022 at ki4pv.UUCP> tanner at ki4pv.UUCP (Tanner Andrews) writes:

>Security is easily solved by refusing to allow locking a file unless
>the file has been successfully opened for WRITE -- there's no real
>excuse for a read-only prog to need to lock a file if the write-file
>prog successfully locks the damned thing anyway.

Not true -- I may be doing a series of non-atomic reads, and I don't want
things changing under me by another program writing in between my reads.
That is where the shared lock comes in handy -- no need to disallow others
from reading too, but if you want to write, you should get exclusive
access.

Rick Lindsley



More information about the Comp.bugs.4bsd.ucb-fixes mailing list