Subject: Re: kern/1043: unlink(2) should not let superuser remove directories
To: None <seebs@solon.com>
From: John Kohl <jtk@kolvir.blrc.ma.us>
List: netbsd-bugs
Date: 05/14/1995 15:53:06
>>>>> "Peter" == Peter Seebach <seebs@solon.com> writes:

(talking about my bug report which deletes the ability of root to link &
unlink directories):

Peter> This is not a bug.  It is a feature.

Peter> It is not for us to decide that the superuser is wrong.

Peter> It is periodically very handy for debugging or breaking
Peter> filesystems, or fixing broken ones.  (In particular, it's one
Peter> possible way to fix a filename with a '/' in it.)

That's an argument for using fsdb, not to let root run rampant causing
file system corruption.  Using fsdb makes it absolutely clear that
you're intentionally doing something dangerous.  Using unlink(2) on
directories is just the _Wrong Way_ to fix a damaged/broken filesystem!

I'll put my money where my mouth is, and volunteer to write an fsdb
program.  Anybody want to send me a man page/reference/description of
the fsdb that comes with other commercial BSD derivatives?
[Are there any publicly-available implementations or pieces?]

==John