From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 3 02:07:53 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 11A3C16A4CE; Sun, 3 Oct 2004 02:07:53 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id A857A43D2F; Sun, 3 Oct 2004 02:07:52 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (harmony.village.org [10.0.0.6]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id i9325GWW069780; Sat, 2 Oct 2004 20:05:19 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 02 Oct 2004 20:06:45 -0600 (MDT) Message-Id: <20041002.200645.21077766.imp@bsdimp.com> To: keramida@freebsd.org From: "M. Warner Losh" In-Reply-To: <20041003015321.GA3190@gothmog.gr> References: <20041002210554.GS35869@seekingfire.com> <20041002.192951.35870461.imp@bsdimp.com> <20041003015321.GA3190@gothmog.gr> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: Sun, 03 Oct 2004 02:07:53 -0000 In message: <20041003015321.GA3190@gothmog.gr> Giorgos Keramidas writes: : On 2004-10-02 19:29, "M. Warner Losh" wrote: : > In message: <20041002210554.GS35869@seekingfire.com> : > Tillman Hodgson writes: : > : 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. : > : > No. You are wrong. if you rm -rf in a chroot, then it won't result : > in foot shooting, necessarily, like it would outside a chroot. : : Since a chroot can always be rm -fr deleted from outside the chroot, : this isn't really a great problem, is it? You miss the point. You said it was always a foot-shooting move. I gave you a concrete example of where it wasn't a foot-shooting move (or even when you could use newfs instead). You reply with a workaround (which may be a valid way to deal, maybe not). My point still stands: it isn't always a foot-shooting move. It isn't a valid work around if you want to delete the chroot from inside the chroot... Warner