Subject: Re: File names and security...
To: Mike Long <email@example.com>
From: James Graham - Systems Mangler <firstname.lastname@example.org>
Date: 06/08/1997 13:44:51
If 'xargs' is currently so broken that it runs the command thru 'sh -c'
first or something, then we deserve to be bitten by this. 'xargs'
should do :
...which means that "rm" gets called with, say "foo; chmod 666 /etc/passwd"
or "foo\nchmod 666 /etc/passwd" (s/passwd/master.&/g)
which would properly produce:
foo; chmod 666 : No such file or directory
chmod 666 : No such file or directory
If xargs is built properly, this whole discussion, which has been redone
at least three times since 1995, and so is now moot. Can we _please_
move on? This looks like a real straw man/red herring deal which can
be achieved with a rewrite of xargs if necessary (it doesn't appear
to be necessary).
Looking at the code, I see that xargs does just what I described above.
The only thing that could possibly do something really rotten is a CLI
(sh/csh/*sh) or something else that uses semicolons to separate commands.
rm/mv/cp/ln are not such utilities; the separation happens in the shell.
...Or Did I Miss Something Here? [TM]
"Do not meddle in the affairs of wizards,
for you are crunchy and taste good with ketchup." --unknown;