From owner-freebsd-hackers Sun May 14 13:30:31 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id NAA28803 for hackers-outgoing; Sun, 14 May 1995 13:30:31 -0700 Received: from bloom-beacon.MIT.EDU (brnstndkramden.acf.nyu.edu@BLOOM-BEACON.MIT.EDU [18.181.0.26]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id NAA28789 for ; Sun, 14 May 1995 13:30:26 -0700 Received: by bloom-beacon.MIT.EDU with UUCP (8.6.12/25-eef) id QAA16794; Sun, 14 May 1995 16:17:18 -0400 Received: (jtk@localhost) by kolvir.blrc.ma.us (8.6.9/JTK931126) id PAA04095; Sun, 14 May 1995 15:53:06 -0400 Date: Sun, 14 May 1995 15:53:06 -0400 From: John Kohl Message-Id: <199505141953.PAA04095@kolvir.blrc.ma.us> To: seebs@solon.com CC: netbsd-bugs@NetBSD.ORG, freebsd-hackers@FreeBSD.org In-reply-to: <199505121303.IAA27634@solutions.solon.com> (message from Peter Seebach on Fri, 12 May 1995 08:03:05 -0500) Subject: Re: kern/1043: unlink(2) should not let superuser remove directories X-US-Snail: 8 Lorne Road, Arlington, MA 02174 Reply-To: jtk@kolvir.blrc.ma.us Sender: hackers-owner@FreeBSD.org Precedence: bulk >>>>> "Peter" == Peter Seebach 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