Re: Protection from the dreaded "rm -fr /"

From: David Schultz (das_at_FreeBSD.ORG)
Date: 10/02/04

  • Next message: Michael Reifenberger: "Re: Protection from the dreaded "rm -fr /""
    Date: Sat, 2 Oct 2004 16:12:11 -0400
    To: Michael Reifenberger <mike@Reifenberger.com>
    
    

    On Sat, Oct 02, 2004, Michael Reifenberger wrote:
    > On Sat, 2 Oct 2004, David Schultz wrote:
    > ...
    > >Do you also want to be able to swap to the root partition while
    > >it's mounted? We can bring back that feature, too. But
    > >personally, I don't see anything wrong with the view that
    > >operations that are guaranteed to shoot people in the foot should
    > >be disallowed.
    > >
    >
    > Every anti foot shooting takes time to check for.
    > A strncmp for every arg is maybe ok. Traversing the tree for realpath is
    > not.
    > The job for `rm` is to remove whatever it is given to get removed.
    > As fast as possible. Nothing else.

    Sigh. The original patch that just used strcmp() wouldn't have
    increased the time to execute rm by more than a few hundred
    nanoseconds.
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Michael Reifenberger: "Re: Protection from the dreaded "rm -fr /""