Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Oct 2004 02:02:26 +0300
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        Garance A Drosihn <drosih@rpi.edu>
Cc:        Lee Harr <missive@hotmail.com>
Subject:   Re: Protection from the dreaded "rm -fr /"
Message-ID:  <20041002230226.GC1381@gothmog.gr>
In-Reply-To: <p06110421bd84c87e063b@[128.113.24.47]>
References:  <BAY2-F27PUPeKljq65R00014185@hotmail.com> <20041002175704.GB2230@gothmog.gr> <p06110421bd84c87e063b@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-10-02 17:22, Garance A Drosihn <drosih@rpi.edu> wrote:
> At 8:57 PM +0300 10/2/04, Giorgos Keramidas wrote:
> >On 2004-10-02 21:23, Lee Harr <missive@hotmail.com> wrote:
> >> How about:
> >> chflags sunlnk /
> >> ?
> >
> >Setting sunlink on / will only protect the / directory, not its
> >descendants, so you don't gain much.
>
> 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. [...]

Hmmm.  This sounds much better indeed :-)



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