diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2007-04-03 00:06:39 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2007-04-03 00:06:39 +0000 |
commit | 4095c9de373eae19a696dfc3895a01bb4d4eab5a (patch) | |
tree | c6b961c9b9e0e8ac6205d3670e7be595c5ab06a4 | |
parent | 20d33ad7e50ee41020927d30457dd6c1ee975bd0 (diff) |
Eliminate the sshd option checking dependency on wc and make it faster.
-rw-r--r-- | tests/sshserver.pl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/sshserver.pl b/tests/sshserver.pl index 974891fcf..3295cca58 100644 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -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; } |