Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Oct 2004 13:49:51 +0300
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        Dmitry Karasik <dmitry@karasik.eu.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Protection from the dreaded "rm -fr /"
Message-ID:  <20041004104951.GA4301@orion.daedalusnetworks.priv>
In-Reply-To: <84ekke3i34.fsf@plab.ku.dk>
References:  <20041002081928.GA21439@gothmog.gr> <20041002102918.W22102@fw.reifenberger.com> <20041002085143.GA52519@gothmog.gr> <84ekke3i34.fsf@plab.ku.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-10-04 12:15, Dmitry Karasik <dmitry@karasik.eu.org> wrote:
> On 02 Oct 04 at 10:51, "Giorgos" (Giorgos Keramidas) wrote:
> Giorgos> The reason I liked this idea is that root has zillions of other
> Giorgos> ways to destroy an entire system, but not many of them are likely
> Giorgos> to be the result of mistyping a single character as shown below:
>
> Giorgos> 	# rm -fr / home/someuser/*
>
> I just wonder, if 'rm' is so fearful to you, why bother changing rm(1)?
> Write a simple wrapper around, as many sysadmins do for their needs,
> and use it instead of rm.
>
> #!/usr/bin/perl -w
> for (@ARGV) {die "$_ is a boo-boo!\n" if m/^\//}
> exit system 'rm' , @ARGV;

I've lost interest in making any sort of changes to rm(1) after the first
dozen or so of messages like this one.

Has nobody else seen the logical fallacy of keeping rm(1) unchanged "in order
to avoid changes that might not be there in the next system" and suggesting a
"locally customized hack like a shell/perl/whatever wrapper" as a better
alternative?  The shell wrapper will not be there in the next system either.

Introducing local incompatibilities and hacks like a perl script wrapper of
rm(1) is highly unportable.  Simply switching between two different machines
will bite you in more dangerous ways than the current version of rm(1) that is
part of the system, once you start depending on the local hack you have in one
of the machines.  Why this is deemed better than something that is part of the
source (tunable or not), is far beyond me.

Having said that, I'm not going to post about this topic in -hackers anymore
(or any other list, for that matter).  The arguments against the change have
not been very true, coherent or satisfactory, but the general sentiment seems
to be that people want rm(1) unchanged.  Unchanged it will be, then.

Thanks to all who posted on the thread.  I didn't intend to start a flamewar
of some sort, but I did.  I apologize for wasting everyone's time & bandwidth.

- Giorgos



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041004104951.GA4301>