[nycbug-talk] Safety Expansion for FreeBSD rm(1)

Pete Wright pete at nomadlogic.org
Mon Oct 1 13:33:37 EDT 2007


On Mon, Oct 01, 2007 at 08:40:53AM -0700, Steven Kreuzer wrote:
> Greetings-
> 
> I am reading through the freebsd-current mailing list and I stumbled upon a
> proposed patch that I thought was rather interesting
> 
> Basically, is a patch to rm that first reads ~/.rm before actually removing
> anything to make sure that what you are trying to delete isn't "protected"
> 
> Example, if I did rm -rf ~ /bin (when I really wanted ~/bin) it would check
> to make sure that /bin and ~ are allowed to be removed.
> 
> I am kinda on the fence about this, but think it could be a useful way to
> protect yourself from yourself
> 
> Project Page: http://people.freebsd.org/~daichi/safety-rm/
> eMail thread on freebsd-current: http://marc.info/?l=freebsd-current&m=119072708632143&w=2
> 
> What do you think?
> 

yea this is pretty bone headed if you ask me.  i'm not comfortable with
a binary in /bin being built to look at filesystems that more likely than
not will live on a remote filesystem (i.e. $HOME) by default in a production
environment.  

while the concept may a good one for shared systems, the same objective can be achieved by
setting up your shell enironment to do this for you and will not require
extending /bin/rm (isn't that what the -i switch is for anyway).

anyway - just my two bits...

-p


-- 
~~oO00Oo~~
Peter Wright
pete at nomadlogic.org
www.nomadlogic.org/~pete
310.869.9459




More information about the talk mailing list