From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 2 18:50:40 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 E157416A4CE; Sat, 2 Oct 2004 18:50:40 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9742443D31; Sat, 2 Oct 2004 18:50:40 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.1/8.12.10) with ESMTP id i92IouXG001177; Sat, 2 Oct 2004 14:50:56 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.1/8.12.10/Submit) id i92IotRr001176; Sat, 2 Oct 2004 14:50:55 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Sat, 2 Oct 2004 14:50:55 -0400 From: David Schultz To: Michael Reifenberger Message-ID: <20041002185055.GA1029@VARK.MIT.EDU> Mail-Followup-To: Michael Reifenberger , Giorgos Keramidas , freebsd-hackers@freebsd.org References: <20041002081928.GA21439@gothmog.gr> <20041002102918.W22102@fw.reifenberger.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041002102918.W22102@fw.reifenberger.com> cc: freebsd-hackers@FreeBSD.ORG cc: Giorgos Keramidas 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 18:50:41 -0000 On Sat, Oct 02, 2004, Michael Reifenberger wrote: > On Sat, 2 Oct 2004, Giorgos Keramidas wrote: > > >Date: Sat, 2 Oct 2004 11:19:28 +0300 > >From: Giorgos Keramidas > >To: freebsd-hackers@freebsd.org > >Subject: Protection from the dreaded "rm -fr /" > > > >John Beck, who works for Sun, has posted an entry in his blog yesterday > >about "rm -fr /" protection, which I liked a lot: > >http://blogs.sun.com/roller/page/jbeck/20041001#rm_rf_protection > > > >His idea was remarkably simple, so I went ahead and wrote this patch for > >rm(1) of FreeBSD: > > > > This does only help for the obvious case of '/' but not for the > './' and '../' or '../../' ... accidents. > > Furthermore does it prevent root from doing `rm -rf /` which is a pretty > legal operation for root since he knows what he is doing. > > This is UNIX, not Windows. Do you also want to be able to swap to the root partition while it's mounted? We can bring back that feature, too. But personally, I don't see anything wrong with the view that operations that are guaranteed to shoot people in the foot should be disallowed.