Isn't it amazing what you find in the manuals?

Michael "Ford" Ditto ditto at cbmvax.UUCP
Fri Feb 24 02:48:58 AEST 1989


In article <308 at hsi86.hsi.UUCP> stevens at hsi.UUCP (Richard Stevens) writes:
>In article <6034 at cbmvax.UUCP>, ditto at cbmvax.UUCP (Michael "Ford" Ditto) writes:
>> I thought locking() only provided advisory locks.
>
>Unknown to most, and, of course, undocumented, is the fact that the
>3b1 (3.5.1 software) supports both advisory and mandatory locking.

That's the fcntl() locking your're talking about; we were talking about
the locking() system call.  fcntl() locking (what I called "real" SysV
locking in the above article) doesn't have the locking() security problem
because fcntl() only allows advisory locking unless the file owner marked
the file for mandatory locking, and to make a write lock you have to have
write permission.  You could, however, prevent a database from being
updated by putting a read lock on the whole thing.
-- 
					-=] Ford [=-

"The number of Unix installations	(In Real Life:  Mike Ditto)
has grown to 10, with more expected."	ford at kenobi.cts.com
- The Unix Programmer's Manual,		...!sdcsvax!crash!kenobi!ford
  2nd Edition, June, 1972.		ditto at cbmvax.commodore.com



More information about the Unix-pc.general mailing list