From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 2 21:05:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 89C7B16A4CE for ; Sat, 2 Oct 2004 21:05:55 +0000 (GMT) Received: from mail.seekingfire.com (coyote.seekingfire.com [24.72.10.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51F5F43D54 for ; Sat, 2 Oct 2004 21:05:55 +0000 (GMT) (envelope-from tillman@seekingfire.com) Received: by mail.seekingfire.com (Postfix, from userid 500) id B87C52D6; Sat, 2 Oct 2004 15:05:54 -0600 (CST) Date: Sat, 2 Oct 2004 15:05:54 -0600 From: Tillman Hodgson To: freebsd-hackers@freebsd.org Message-ID: <20041002210554.GS35869@seekingfire.com> References: <20041002081928.GA21439@gothmog.gr> <200410021123.59811.max@love2party.net> <20041002165155.GP35869@seekingfire.com> <20041002175517.GA2230@gothmog.gr> <20041002204851.K24332@fw.reifenberger.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041002204851.K24332@fw.reifenberger.com> X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . X-GPG-Key-ID: 828AFC7B X-GPG-Fingerprint: 5584 14BA C9EB 1524 0E68 F543 0F0A 7FBC 828A FC7B X-GPG-Key: http://www.seekingfire.com/gpg_key.asc X-Urban-Legend: There is lots of hidden information in headers User-Agent: Mutt/1.5.6i Subject: Re: Protection from the dreaded "rm -fr /" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Oct 2004 21:05:55 -0000 On Sat, Oct 02, 2004 at 09:16:08PM +0200, Michael Reifenberger wrote: > On Sat, 2 Oct 2004, Giorgos Keramidas wrote: > ... > >>Exactly. Who would expect `rm -rf /` to actually succeed? It's not only > >>dangerous, it doesn't work in a useful way ;-) > >> > >>If one is thinking about `rm -rf /`, `newfs` is probably the right > >>answer. > > newfs only works if the root is not mounted because otherwise the device is > locked. (Hmm is GEOM too anti foot shooting? But can't you reenable > foot-shooting via sysctl?) whereas `rm -rf /` works allwsys > :-) It'll never work, though, that's the thing. At some point it'll rm something it itself needs and error out. There isn't a way to use `rm -rf /` that /doesn't/ result in foot-shooting. This isn't a sub-tree like /etc or /sbin (which are rooted in /), this is only to treat / itself specially. -T -- "If knowledge creates problems, ignorance will not solve them" -- Isaac Asimov.