Skip to content

Commit

Permalink
sshserver.pl: use quotes for given options
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Karlson2k authored and bagder committed Mar 26, 2016
1 parent 3d144ab commit e326448
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/sshserver.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit e326448

Please sign in to comment.