Date: Sat, 2 Oct 2004 20:10:52 +0300 From: Giorgos Keramidas <keramida@freebsd.org> To: "Jacques A. Vidrine" <nectar@freebsd.org>, Peter Jeremy <PeterJeremy@optushome.com.au>, freebsd-hackers@freebsd.org Subject: Re: Protection from the dreaded "rm -fr /" Message-ID: <20041002171052.GA2000@gothmog.gr> In-Reply-To: <20041002164607.GD90985@madman.celabo.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-10-02 11:46, "Jacques A. Vidrine" <nectar@freebsd.org> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041002171052.GA2000>