From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 2 17:57:07 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 EC02216A4CE for ; Sat, 2 Oct 2004 17:57:07 +0000 (GMT) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09CF443D39 for ; Sat, 2 Oct 2004 17:57:07 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from gothmog.gr (patr530-b208.otenet.gr [212.205.244.216]) i92Hv4OZ026341; Sat, 2 Oct 2004 20:57:05 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id i92Hv4NS002290; Sat, 2 Oct 2004 20:57:04 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id i92Hv4lp002289; Sat, 2 Oct 2004 20:57:04 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Sat, 2 Oct 2004 20:57:04 +0300 From: Giorgos Keramidas To: Lee Harr Message-ID: <20041002175704.GB2230@gothmog.gr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 17:57:08 -0000 On 2004-10-02 21:23, Lee Harr wrote: > >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: > > How about: > > chflags sunlnk / > ? Setting sunlink on / will only protect the / directory, not its descendants, so you don't gain much.