From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 2 19:26:26 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 77A3616A4CE; Sat, 2 Oct 2004 19:26:26 +0000 (GMT) Received: from mailout10.sul.t-online.com (mailout10.sul.t-online.com [194.25.134.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DC8243D1F; Sat, 2 Oct 2004 19:26:26 +0000 (GMT) (envelope-from mike@reifenberger.com) Received: from fwd07.aul.t-online.de by mailout10.sul.t-online.com with smtp id 1CDpWS-0004qn-01; Sat, 02 Oct 2004 21:26:24 +0200 Received: from fw.reifenberger.com (X7jICiZTQejXrAzlrjlLj3tA0nOUllxt2AhcHBmCeL9+UI23uemn66@[217.232.221.224]) by fmrl07.sul.t-online.com with esmtp id 1CDpWQ-1Fuc9g0; Sat, 2 Oct 2004 21:26:22 +0200 Received: from localhost (mike@localhost)i92JQMeH024525; Sat, 2 Oct 2004 21:26:22 +0200 (CEST) (envelope-from mike@reifenberger.com) X-Authentication-Warning: fw.reifenberger.com: mike owned process doing -bs Date: Sat, 2 Oct 2004 21:26:21 +0200 (CEST) From: Michael Reifenberger To: David Schultz In-Reply-To: <20041002185055.GA1029@VARK.MIT.EDU> Message-ID: <20041002211759.R24332@fw.reifenberger.com> References: <20041002081928.GA21439@gothmog.gr> <20041002102918.W22102@fw.reifenberger.com> <20041002185055.GA1029@VARK.MIT.EDU> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-ID: X7jICiZTQejXrAzlrjlLj3tA0nOUllxt2AhcHBmCeL9+UI23uemn66@t-dialin.net X-TOI-MSGID: 27442d0e-9b19-4f4d-8f1a-0a6210375166 cc: freebsd-hackers@FreeBSD.ORG 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 19:26:26 -0000 On Sat, 2 Oct 2004, David Schultz wrote: ... > 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. > Every anti foot shooting takes time to check for. A strncmp for every arg is maybe ok. Traversing the tree for realpath is not. The job for `rm` is to remove whatever it is given to get removed. As fast as possible. Nothing else. Bye/2 --- Michael Reifenberger, Business Development Manager SAP-Basis, Plaut Consulting Comp: Michael.Reifenberger@plaut.de | Priv: Michael@Reifenberger.com http://www.plaut.de | http://www.Reifenberger.com