diff options
author | Pavel Raiskup <praiskup@redhat.com> | 2017-04-25 12:35:39 +0200 |
---|---|---|
committer | Pavel Raiskup <praiskup@redhat.com> | 2017-04-25 14:33:14 +0200 |
commit | 1bfb11a46bd265ce1d0d39a031149f5f45055f0c (patch) | |
tree | 41494c212dcf7e579043dbd0cd629c9c14f67c8d | |
parent | 722b6af0fad19b3d9f21924ae5aa6dfae5957378 (diff) | |
download | libtool-1bfb11a46bd265ce1d0d39a031149f5f45055f0c.tar.gz |
libtool: quote 'cd' command in shipped relink_command
Per report from Eric Blake:
https://lists.gnu.org/archive/html/bug-libtool/2015-10/msg00009.html
* build-aux/ltmain.in (func_mode_link): Quote 'cd `pwd`' properly
before generating the $relink_command. Do that for the potential
scenarios where the pwd could contain spaces or special shell
characters.
-rw-r--r-- | build-aux/ltmain.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in index c3058f21..bbc76433 100644 --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in @@ -8614,7 +8614,8 @@ EOF relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done - func_quote_arg pretty,unquoted "(cd `pwd`; $relink_command)" + func_quote eval cd "`pwd`" + func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" relink_command=$func_quote_arg_unquoted_result fi @@ -8860,7 +8861,8 @@ EOF fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + func_quote eval cd "`pwd`" + relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" func_quote_arg pretty,unquoted "$relink_command" relink_command=$func_quote_arg_unquoted_result if test yes = "$hardcode_automatic"; then |