Two identical filenames in one directory!

Brian Thomson thomson at hub.toronto.edu
Sat Sep 30 11:20:52 AEST 1989


In article <2516 at auspex.auspex.com> guy at auspex.auspex.com (Guy Harris) writes:
>And on earlier versions, root *can* write a directory?  Wrong.  The only
>way "root" can write a directory - on V6, V7, S3, S5, or 4.xBSD, or on
>most if not all UNIXes derived therefrom - is to open the raw disk and
>stomp on the file. 

Hmm.  In my ongoing effort to further the cause of picking nits,
I offer the following:

1) In both V6 and V7, root is able to write a newly creat()'ed directory.
   This is how mkdir used to make the . and .. entries.

2) In V6, if you were unlucky enough to have a directory named 'core'
   and ran a sickly setuid-root program too near to it, you would discover
   yet another way that root could write a directory.
-- 
		    Brian Thomson,	    CSRI Univ. of Toronto
		    utcsri!uthub!thomson, thomson at hub.toronto.edu



More information about the Comp.unix.wizards mailing list