Two identical filenames in one directory!

Conor P. Cahill cpcahil at virtech.UUCP
Sun Oct 1 10:56:24 AEST 1989


In article <17076 at rpp386.Dallas.TX.US>, jfh at rpp386.Dallas.TX.US (John F. Haugh II) writes:
> Only
> the low 9 bits of the file mode are honored by create, to get the
> other 7 bits you have to use mknod().

Nope. create (and open) will also set the set[u|g]id bits, so it will
set 11 of the 12 low order bits (plus the file type bits for the regular
file file type).  The sticky bit can only be set using the [f]chmod system
call.  The other bits (file type) are set by mknod.

Since I only have SV.3 handy, I can't verify that this is also true for 
BSD, but I am pretty sure it is.
-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+



More information about the Comp.unix.wizards mailing list