Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 May 1995 15:53:06 -0400
From:      John Kohl <jtk@kolvir.blrc.ma.us>
To:        seebs@solon.com
Cc:        netbsd-bugs@NetBSD.ORG, freebsd-hackers@FreeBSD.org
Subject:   Re: kern/1043: unlink(2) should not let superuser remove directories
Message-ID:  <199505141953.PAA04095@kolvir.blrc.ma.us>
In-Reply-To: <199505121303.IAA27634@solutions.solon.com> (message from Peter Seebach on Fri, 12 May 1995 08:03:05 -0500)

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505141953.PAA04095>