bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Misquoting in libtool --mode=execute


From: Andreas Schwab
Subject: Misquoting in libtool --mode=execute
Date: Tue, 05 Feb 2002 22:28:23 +0100
User-agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.2.50 (ia64-suse-linux)

libtool --mode=execute does not properly preserve quoting for the command
to execute.  If the command contains meta characters they will be
reevaluted.  On the other hand, when using --dry-run the quotes that were
put around the arguments are not reevaluated.

2002-02-05  Andreas Schwab  <address@hidden>

        * ltmain.in: Properly quote command to execute with
        --mode=execute, and reevaluate the command line with --dry-run.

Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.286
diff -u -a -u -r1.286 ltmain.in
--- ltmain.in   29 Jan 2002 22:58:35 -0000      1.286
+++ ltmain.in   5 Feb 2002 21:24:12 -0000
@@ -5139,14 +5139,14 @@
       fi
 
       # Now prepare to actually exec the command.
-      exec_cmd="\$cmd$args"
+      exec_cmd="\"\$cmd\"$args"
     else
       # Display what would be done.
       if test -n "$shlibpath_var"; then
        eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
        $echo "export $shlibpath_var"
       fi
-      $echo "$cmd$args"
+      eval \$echo \"\$cmd\"$args
       exit 0
     fi
     ;;

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]