mirror of
https://github.com/curl/curl.git
synced 2026-05-14 03:36:21 +03:00
Eliminate the sshd option checking dependency on wc and make it faster.
This commit is contained in:
parent
20d33ad7e5
commit
4095c9de37
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue