Subject: Re: kern/1043: unlink(2) should not let superuser remove directories
To: None <giles@nemeton.com.au>
From: John Kohl <jtk@kolvir.blrc.ma.us>
List: netbsd-bugs
Date: 05/11/1995 22:27:23
>>>>> "Giles" == Giles Lean <giles@nemeton.com.au> writes:

Giles> On Thu, 11 May 1995 16:20:07 -0700  John Kohl wrote:


>> >Number:         1043
>> >Category:       kern
>> >Synopsis:       root can unlink directories, causing FS corruption

Giles> This is historical practice.  It is definitely dangerous, but
Giles> occasionally handy to fix filesystem corruptions.  (Which I havn't
Giles> seen on NetBSD, mind you, but hardware errors and sudden loss of
Giles> power can happen to anyone.)

I know it's historical practice. (I probably should have stated that;
other folks have pointed it out in private mail).

In my 10 years of using UNIX or UNIX-like systems, every time root has
unlinked a directory it has been accidental or inadvertent, and resulted
in much gnashing of teeth and pulling of hair.  I have _never_ had
occasion to intentionally unlink a directory with unlink(2).

Several times I've been burned by this have been RCS directories
disappearing or turning into a regular file.  gnash gnash gnash!

==John