From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 2 17:10:56 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 65AF616A4CE; Sat, 2 Oct 2004 17:10:56 +0000 (GMT) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E65C43D1F; Sat, 2 Oct 2004 17:10:55 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from gothmog.gr (patr530-b208.otenet.gr [212.205.244.216]) i92HArqv020921; Sat, 2 Oct 2004 20:10:53 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i92HAqwD002071; Sat, 2 Oct 2004 20:10:52 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i92HAqHd002070; Sat, 2 Oct 2004 20:10:52 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Sat, 2 Oct 2004 20:10:52 +0300 From: Giorgos Keramidas To: "Jacques A. Vidrine" , Peter Jeremy , freebsd-hackers@freebsd.org Message-ID: <20041002171052.GA2000@gothmog.gr> References: <20041002081928.GA21439@gothmog.gr> <20041002102918.W22102@fw.reifenberger.com> <20041002085143.GA52519@gothmog.gr> <20041002124349.GA21569@cirb503493.alcatel.com.au> <20041002164607.GD90985@madman.celabo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041002164607.GD90985@madman.celabo.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 17:10:56 -0000 On 2004-10-02 11:46, "Jacques A. Vidrine" wrote: > > Will the next step be to prevent `rm -fr *' iff the current working > directory is '/' ? Please explain your answer. :-) No. The fact * was passed is not visible to the running program. It's probably better to do this in the shell before it does the wildcard expansion, just like tcsh does. The "rm -fr / tmp/foo" case *is* visible to the running program though and is a lot easier to handle. I see a lot of people don't like the change, even though I made it default to off and controlled by an environment variable. There's no reason to keep pushing for it, then.