Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Ird-Beta.KID
On Tuesday 25 March 2003 14:55, Matthias Schniedermeyer wrote:
> On Tue, Mar 25, 2003 at 02:12:29PM +0100, Carsten Koch wrote:
> > Matthias Schniedermeyer wrote:
> > ...
> >
> > >>>commands as the root user: 'cd /etc; rm -rf .*'
> >
> > ...
> >
> > >Wrong. The command deletes absolutly NOTHING. (The jumping ".")
> >
> > Then try that on your machine, Matthias. ;-)
>
> I'm not quite sure if "rm" doesn't have the cascading problem
> anymore. (".." is included in ".*")
I just verified this to be sure (not with /etc, doh!)
It seems rm is way more cautious than most of us (including myself) would
assume, cause this is what happens:
linux:/tmp/meuk # rm -rf .*
rm: cannot remove `.' or `..'
rm: cannot remove `.' or `..'
quasar:/tmp/meuk # rm -rf .
rm: cannot remove `.' or `..'
quasar:/tmp/meuk #
So, contrary to what you'd believe (the wildcard .* matching . or ..) rm
does not allow you to do this. It amazes me, but it is good for security.
:-)
This happens on SuSE 8.0 and 7.2. by the way. But maybe other
distributions show different behaviour. Do not try this at home. All
disclaimers apply. ;-)
> MAYBE the rm is even equivalent to "rm -rf /*" and kills your whole
> machine.
Yeah yeah. But I suppose that if wildcards really worked like that
someone would have changed that real long ago. Cause if your suggestion
that ".*" would fit ".." , ".*" would then also fit on anything, like
../../../usr/local/../src/linux/.config . And that is just too weird to
consider, isn't it ? ;-)
Maarten
--
This statement is either false or a paradox.
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index