Date: 04 Oct 2004 12:15:11 +0200 From: Dmitry Karasik <dmitry@karasik.eu.org> To: Giorgos Keramidas <keramida@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Protection from the dreaded "rm -fr /" Message-ID: <84ekke3i34.fsf@plab.ku.dk> In-Reply-To: Giorgos Keramidas's message of "Sat, 2 Oct 2004 11:51:43 %2B0300" References: <20041002081928.GA21439@gothmog.gr> <20041002102918.W22102@fw.reifenberger.com> <20041002085143.GA52519@gothmog.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Giorgos! 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; -- Sincerely, Dmitry Karasik --- catpipe Systems ApS *BSD solutions, consulting, development www.catpipe.net +45 7021 0050
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84ekke3i34.fsf>