From owner-freebsd-current@FreeBSD.ORG Tue Sep 25 18:33:20 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E996A16A41B; Tue, 25 Sep 2007 18:33:20 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (cl-162.ewr-01.us.sixxs.net [IPv6:2001:4830:1200:a1::2]) by mx1.freebsd.org (Postfix) with ESMTP id 500B913C494; Tue, 25 Sep 2007 18:33:20 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.8/8.13.8) with ESMTP id l8PIXDnu078930; Tue, 25 Sep 2007 13:33:13 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.8/8.13.8/Submit) id l8PIXDhe078929; Tue, 25 Sep 2007 13:33:13 -0500 (CDT) (envelope-from brooks) Date: Tue, 25 Sep 2007 13:33:13 -0500 From: Brooks Davis To: cpghost Message-ID: <20070925183313.GB78038@lor.one-eyed-alien.net> References: <46F905FD.9060208@freebsd.org> <20070925194008.3c2d7113@epia-2.farid-hajji.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WYTEVAkct0FjGQmd" Content-Disposition: inline In-Reply-To: <20070925194008.3c2d7113@epia-2.farid-hajji.net> User-Agent: Mutt/1.5.15 (2007-04-06) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Tue, 25 Sep 2007 13:33:13 -0500 (CDT) Cc: Daichi GOTO , Masanori OZAWA , FreeBSD Current Subject: Re: The safety expansion for FreeBSD rm(1) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2007 18:33:21 -0000 --WYTEVAkct0FjGQmd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 25, 2007 at 07:40:08PM +0200, cpghost wrote: > On Tue, 25 Sep 2007 21:58:37 +0900 > Daichi GOTO wrote: >=20 > > Today is not unionfs. Introduction for safety expansion of rm(1). > > I know that some unix folks have a experience that you remove some > > files or directories accidentally. Yes, me too. LoL > >=20 > > Have you any dreams that rm(1) autonomously judges target should > > be remove or not? To complexify system base command is objectionable > > behavior but adding some little and simple mechanism to prevent a > > issue is acceptable I suppose. > >=20 > > We have created safety expansion for rm(1). If you have any interests, > > please try follow patch. > >=20 > > http://people.freebsd.org/~daichi/safety-rm/ > >=20 > > Thanks :) >=20 > Interesting idea, but isn't that a violation of POLA? Imagine an > unsuspecting sysadmin trying to rm something, and forgetting > or not knowing about ~/.rm? All they have to do is specify -f and ~/.rm is ignored so I don't think it's that big a deal. It does raise the potential of werid side effects in scri= pts, but since you have to deploy ~/.rm files for anything to happen, I don't se= e it as that big a deal. It might be useful to have the ability to turn off ~/.= rm support via an environmental variable. > Isn't it better to protect important system directories with > something like: > # chflags sunlink /path/to/dir > and unprotect them with > # chflags nosunlink /path/to/dir > to avoid mistakes? The above change means you have to apply the hammer of chflags to do anything. The patch lets you specify certain directories where you're prompted instead. I see that as much more useful. -- Brooks --WYTEVAkct0FjGQmd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFG+VRoXY6L6fI4GtQRAlfpAJ9Exv7yLuGmqFhqqno/DQkLRzspjwCfQwko b7dA8pUxmh1M3p+ZnzqpTCc= =ZlGD -----END PGP SIGNATURE----- --WYTEVAkct0FjGQmd--