xorl %eax, %eax

rm -rf / sucks

with 3 comments

Well, I spend the weekend with some friends and during our lulz times we decided to rm a box. I don’t usually rm boxes or participating in such acts, but we knew the admin and it would be definitely fun, so… I haven’t rm’d any box for quite some time and after getting local root using one common exploit I typed:

rm -rf /

I was kind of surprised when I realized that it didn’t work. Of course, we could do something more fun like:

cat /dev/urandom > /dev/hda

Anyway, we did this:

cd / && rm -rf *

It worked, but I was curious who was the gay developer that did this to rm :(

Here is some code found at rm.c from the latest release of GNU core-utils:

227 int
228 main (int argc, char **argv)
229 {
230   bool preserve_root = true;
231   struct rm_options x;
351   if (x.recursive & preserve_root)
352     {
353       static struct dev_ino dev_ino_buf;
354       x.root_dev_ino = get_root_dev_ino (&dev_ino_buf);
355       if (x.root_dev_ino == NULL)
356         error (EXIT_FAILURE, errno, _("failed to get attributes of %s"),
357                quote ("/"));
358     }

So… from now on, we should rename rm -rf to:

rm -rf --no-preserve-root /

Which is way more gay and ugly and it seems they no longer have “preserve-root” disabled by default. There are even more retarded users that report this feature as a bug. I hate you. You take all the fun out of it and you’re making things worst since from now on I’ll be issuing something like this (you know… or dd(1), shred(1) etc.):

cat /dev/urandom > /dev/your_hard_disk

P.S.: To the guy that made this behavior default: Shame on you.

Written by xorl

May 11, 2009 at 15:23

Posted in fun

3 Responses

Subscribe to comments with RSS.

  1. posts like that will bite you in the ass a couple of years down the line. Come on man, you can do a lot better :-)


    May 11, 2009 at 17:50

  2. I posted this in the “fun” category to clarify that this is just fun/joke, nothing serious.


    May 11, 2009 at 18:03

  3. Nanny code to open source is the same use as a nanny state to a free country…that is, none at all. I can understand not providing a GUI via Gnome to rm -rf /, but to disable it in the code? Silly, to me.


    May 11, 2009 at 18:56

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s