]> granicus.if.org Git - curl/commitdiff
Eliminate the sshd option checking dependency on wc and make it faster.
authorDan Fandrich <dan@coneharvesters.com>
Tue, 3 Apr 2007 00:06:39 +0000 (00:06 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Tue, 3 Apr 2007 00:06:39 +0000 (00:06 +0000)
tests/sshserver.pl

index 974891fcf338f946be81ea77b0270327cc366787..3295cca5816eaf67e6be652192c5a52fe881baf1 100644 (file)
@@ -115,8 +115,7 @@ if (($ssh_daemon !~ /OpenSSH/) || (10 * $ssh_ver_major + $ssh_ver_minor < 37)) {
 # Check here for possible unsupported options, avoiding its use in sshd.
 sub sshd_supports_opt($) {
     my ($option) = @_;
-    my $err = 1;
-    chomp($err = qx($sshd -t -o $option=no 2>&1 | grep $option 2>&1 | wc -l));
+    my $err = grep /$option/, qx($sshd -t -o $option=no 2>&1);
     return !$err;
 }