Re: A simple hate today.

[prev] [thread] [next] [lurker] [Date index for 2006/05/25]

From: Juerd
Subject: Re: A simple hate today.
Date: 20:48 on 25 May 2006
H.Merijn Brand skribis 2006-05-25 21:46 (+0200):
> > -? is still dangerous:
> >     touch -- -r
> >     foo -?
> Your fault, core dumped.

Well, imagine "touch -- -r" was actually "bar /etc/passwd", which is
closed source and left a file called "-r" in the cwd.

Do you encourage running "ls" before using "-?", for security reasons?

> > Now, -? might resolve to -r, which in foo's case, means foo tries to
> > delete every file in your home directory. Too bad.
> That is unix. You asked for it, you got it.
> That is why many shells have aliasses and completions.
> rm -i is the default for a lot of users

An alias for rm won't help against a direct unlink call.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html
There's stuff above here

Generated at 09:00 on 29 May 2006 by mariachi 0.52