]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
sshserver.pl: use quotes for given options
authorKarlson2k <k2k@narod.ru>
Mon, 22 Feb 2016 09:30:37 +0000 (12:30 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 26 Mar 2016 22:34:55 +0000 (23:34 +0100)
Fixed failed redirection of stderr with some options. At least on Msys2,
perl fails to redirect stderr if $value contains newline or other weird
characters.

tests/sshserver.pl

index b0c0229b6c3aaf1630cc73bcaa105302ba6783cc..b305711b3673e8969447b9b2d8b60fbe50c2e06b 100755 (executable)
@@ -558,7 +558,7 @@ sub sshd_supports_opt {
         ($sshdid =~ /SunSSH/)) {
         # ssh daemon supports command line options -t -f and -o
         $err = grep /((Unsupported)|(Bad configuration)|(Deprecated)) option.*$option/,
-                    qx("$sshd" -t -f $sshdconfig -o $option=$value 2>&1);
+                    qx("$sshd" -t -f $sshdconfig -o "$option=$value" 2>&1);
         return !$err;
     }
     if(($sshdid =~ /OpenSSH/) && ($sshdvernum >= 299)) {