Hard links to directories: why not?

peter da silva peter at ficc.ferranti.com
Thu Jul 26 06:32:03 AEST 1990


In article <1990Jul24.200022.2265 at dg-rtp.dg.com>, goudreau at larrybud.rtp.dg.com (Bob Goudreau) writes:
> If you prohibit
> non-superusers from unlinking them, then you're stuck with the unlovely
> situation of users being unable to delete links they've created, even
> though they have write access in the affected directory.  If you lift
> this prohibition, then you can easily end up with directories whose
> ".." entry points nowhere (or worse yet, points to what used to be
> the parent inode, but has now been recycled into something completely
> different).

(a) There still remain link counts. Just make rmdir check link counts.
    It already checks to see if the directory is empty. Then it will
    say "rmdir: Directory has firm links".

(b) The inode won't be reused. Link counts again.
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
<peter at ficc.ferranti.com>



More information about the Comp.unix.wizards mailing list