]> git.ipfire.org Git - thirdparty/autoconf.git/commit
Proper file name escaping in Autoconf programs and Perl modules.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 8 Dec 2007 10:46:43 +0000 (11:46 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 8 Dec 2007 10:46:43 +0000 (11:46 +0100)
commit449317f7ee33553165f46de6d818a44ee2cd7def
tree726f0db355a6c46465513c4ce3f7ca3035aaaaa5
parent7fb34e3eec4e64db248dc62bba8bf0e4af963750
Proper file name escaping in Autoconf programs and Perl modules.

This includes escaping of characters special to the shell
as well as special to Perl, e.g., leading `<' or `>'.
For example, when $file starts with `>', `open ">$file"'
wrongly tries to append to a different file.

* bin/autoconf.as: Fix quoting for autom4te options.
* lib/Autom4te/General.pm (shell_quote): New function, taken
from coreutils, written by Jim Meyering.
(mktmpdir): Use it.
* bin/autom4te.in (files_to_options, handle_m4): Use shell_quote
and open_quote.
* bin/autoreconf.in (parse_args): Likewise.
* bin/autoscan.in (main): Likewise.
* bin/autoupdate.in (main): Likewise.
* bin/autoheader.in: Likewise, fixing old insufficient escaping.
* bin/ifnames.in: Likewise, XFile usage fixes.
* tests/tools.at (autom4te and whitespace in file names): Extend
test.  Test twice, with special characters allowed on w32, and the
rest.  Test leading and trailing whitespace, for `open_quote'.
(autotools and whitespace in file names): New, analogous test.
Reported by Paul Eggert and Benoit Sigoure, additional suggestions
by Russ Allbery and Eric Blake.
ChangeLog
bin/autoconf.as
bin/autoheader.in
bin/autom4te.in
bin/autoreconf.in
bin/autoscan.in
bin/autoupdate.in
bin/ifnames.in
lib/Autom4te/General.pm
tests/tools.at