Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Oct 2004 16:11:13 -0600
From:      <soralx@cydem.org>
To:        Ceri Davies <ceri@submonkey.net>, Garance A Drosihn <drosih@rpi.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Protection from the dreaded "rm -fr /"
Message-ID:  <200410021611.13450.soralx@cydem.org>
In-Reply-To: <20041002220035.GD2493@submonkey.net>
References:  <BAY2-F27PUPeKljq65R00014185@hotmail.com> <p06110421bd84c87e063b@[128.113.24.47]> <20041002220035.GD2493@submonkey.net>

next in thread | previous in thread | raw e-mail | index | archive | help

> > We could add a new flag "srunlnk", or maybe even "srm-r".  The "rm"
> > command will always have to stat() the file it is given (just to
> > see if it is a directory), so it could check to see if this flag
> > is turned on.  If it is turned on, then 'rm' could refuse to honor
> > any '-rf' request on that directory.

Why not to just add a flag to 'rm'? For example, `rm -rf /` or 
`cd; rm -rf .././` will fail, but `rm -rF /` will succeed.

Timestamp: 0x415F2702
[SorAlx]  http://cydem.org.ua/
ridin' VN1500-B2



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410021611.13450.soralx>