From owner-freebsd-hackers Sun May 14 16:19:48 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id QAA03649 for hackers-outgoing; Sun, 14 May 1995 16:19:48 -0700 Received: from gw.home.vix.com (gw.home.vix.com [192.5.5.1]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id QAA03643 for ; Sun, 14 May 1995 16:19:48 -0700 Received: by gw.home.vix.com id AA12654; Sun, 14 May 95 16:18:58 -0700 Message-Id: <9505142318.AA12654@gw.home.vix.com> X-Btw: vix.com is also gw.home.vix.com and vixie.sf.ca.us To: jtk@kolvir.blrc.ma.us Cc: seebs@solon.com, netbsd-bugs@NetBSD.ORG, freebsd-hackers@FreeBSD.org Subject: Re: kern/1043: unlink(2) should not let superuser remove directories In-Reply-To: Your message of "Sun, 14 May 1995 15:53:06 EDT." <199505141953.PAA04095@kolvir.blrc.ma.us> Date: Sun, 14 May 1995 16:18:57 -0700 From: Ted Lemon Sender: hackers-owner@FreeBSD.org Precedence: bulk > 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 agree completely - surgical tools for filesystems do not belong in the kernel. > 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? Unfortunately, fsdb is virtually impossible to use because its interface is essentially adb-like, and all the commands are single-character and non-mnemonic. If it were something one used every day, that would be okay, but it's more like once every two years for me, so I always have to track down a man page, which can be hard when my root partition is hosed. If you're going to write an fsdb replacement, I think it would be a win to put in a more gdb- or even dbx-like interface. It might be worth looking at the man page for advice on what features to put in, but that'd be about it, IMHO. _MelloN_