rm etc. (was: Nasty Security Hole?)

John F Carr jfc at athena.mit.edu
Mon Nov 21 15:12:29 AEST 1988


In article <8941 at smoke.BRL.MIL> gwyn at brl.arpa 
 (Doug Gwyn (VLD/VMB) <gwyn>) writes:

>All implementations of "symbolic links" that
>I know of are broken in this regard; even though symbolic links to an
>inode exist, the inode will vanish when all its "hard" links are
>removed (and the last open file table entry associated with it is closed).

I don't count this as a bug; it can be quite useful.  For example, hard links
must be to the same device.  An implementation of symbolic links that had the
destiniation be an inode would be indistinguishable from a hard link (at least
in 4.3, symbolic links point to filenames [or, in fact, any string that could
possibly be a filename]).  There is no way to guarantee that all symbolic 
links to a filename are on mounted filesystems, so it is not reasonable to 
have their existence influence unlinking.

--
   John Carr             "When they turn the pages of history,
   jfc at Athena.mit.edu     When these days have passed long ago,
   bloom-beacon!          Will they read of us with sadness
   athena.mit.edu!jfc     For the seeds that we let grow?"  --Neil Peart



More information about the Comp.unix.wizards mailing list