Protection from the dreaded "rm -fr /"
Simon L. Nielsen
simon at FreeBSD.org
Sat Oct 2 08:03:52 PDT 2004
On 2004.10.02 16:48:46 +0200, Dimitry Andric wrote:
> On 2004-10-02 at 10:19:28 Giorgos Keramidas wrote:
>
> > His idea was remarkably simple, so I went ahead and wrote this patch for
> > rm(1) of FreeBSD:
>
> Of course, your work is commendable, but isn't is much simpler to just
> not type commands like that? I mean, "rm -rf /etc" or "rm -rf /bin"
> are just as bad, but do you really want to be checking for all
> possible `bad' deletions? That way, we'll start to look like some
> software from Redmond... :)
As keramida has noted this particular case is more likely to be made
by mistake than many others, e.g. by doing "rm -rf / foo/bar" where
"rm -rf /foo/bar/" was meant. Therefor I really think keramidas
_optional_ foot-shooting feature is a nice thing.
I know I will enable it on my systems if it's committed, and probably
keep it as a local patch if not.
--
Simon L. Nielsen
FreeBSD Bikeshed Team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20041002/fcd1b33c/attachment.bin
More information about the freebsd-hackers
mailing list