lockf and the SVID, (Was "Re: Wanted: lockf system call source")

David Brand dave at dvm.UUCP
Wed Dec 3 12:34:52 AEST 1986


In article <2264 at sdcsvax.UCSD.EDU> hutch at sdcsvax.UUCP (Jim Hutchison) writes:

>Not that H-P is at fault for following the mighty SVID, but why require
>that the file-descriptor is open for write to do a write lock?  Wouldn't

Requiring that a file be open in write mode is a sure fire way of requiring
that the user have write premission.  An implementation should require that
a process have write permission on the file before allowing MANDATORY write
mode locks to prevent unauthorized denial of resources (eg. locking
/etc/passwd).  This restriction is then carried over into ADVISORY locks for
consistency.

This is often cited as the reason to leave out mandatory locks entirely.
-- 

					- Dave

...{decvax,ihnp4,ucbvax}!allegra!phri!orville!dvm!dave



More information about the Comp.unix.wizards mailing list