Protection from the dreaded "rm -fr /"
keramida at freebsd.org
Tue Oct 5 17:12:55 PDT 2004
On 2004-10-05 10:37, Chris Dillon <cdillon at wolves.k12.mo.us> wrote:
> I think you just nailed it on the head right here... if you say "rm
> -rf /" you probably mean it, but if you say "rm -rf / foo" you
> probably oopsed (pretty good bet, since rm / makes asking to rm foo
> redundant). How about checking if there is more than one argument,
> and if one of those arguments is "/", fail. If there is only one
> argument, even if it is "/", assume the user knows what he is doing
> and proceed normally.
I no longer have any interest in working towards any sort of change
related to this thread. Please do not Cc: me when replying.
More information about the freebsd-hackers