This is a temporary change to test if OpenSSH 3.6 and SunSSH 1.1
are good/compatible enough to run the test suite ssh server and socks tests
This commit is contained in:
@@ -2380,12 +2380,18 @@ sub startservers {
|
|||||||
}
|
}
|
||||||
if(!$run{'socks'}) {
|
if(!$run{'socks'}) {
|
||||||
my $sshversion=`ssh -V 2>&1`;
|
my $sshversion=`ssh -V 2>&1`;
|
||||||
if ($sshversion =~ /SSH_(\d+)\.(\d+)/i) {
|
if($sshversion =~ /OpenSSH[_-](\d+)\.(\d+)/i) {
|
||||||
if ($1*10+$2 < 37) {
|
if ($1*10+$2 < 36) {
|
||||||
# need 3.7 for socks5 - http://www.openssh.com/txt/release-3.7
|
# need 3.7 for socks5 - http://www.openssh.com/txt/release-3.7
|
||||||
return "ssh version ($1.$2) insufficient; need at least 3.7";
|
return "OpenSSH version ($1.$2) insufficient; need at least 3.7";
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
elsif($sshversion =~ /Sun[_-]SSH[_-](\d+)\.(\d+)/i) {
|
||||||
|
if ($1*10+$2 < 11) {
|
||||||
|
return "SunSSH version ($1.$2) insufficient; need at least 1.1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
return "Unsupported ssh client\n";
|
return "Unsupported ssh client\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,13 @@ if ($tmpstr =~ /OpenSSH[_-](\d+)\.(\d+)(\.(\d+))*/) {
|
|||||||
($ssh_ver_major, $ssh_ver_minor, $ssh_ver_patch) = ($1, $2, $4);
|
($ssh_ver_major, $ssh_ver_minor, $ssh_ver_patch) = ($1, $2, $4);
|
||||||
$ssh_daemon = 'OpenSSH';
|
$ssh_daemon = 'OpenSSH';
|
||||||
}
|
}
|
||||||
|
if(!$ssh_daemon) {
|
||||||
|
chomp($tmpstr = qx($sshd -V 2>&1 | grep Sun_SSH));
|
||||||
|
if($tmpstr =~ /Sun[_-]SSH[_-](\d+)\.(\d+)/) {
|
||||||
|
($ssh_ver_major, $ssh_ver_minor) = ($1, $2);
|
||||||
|
$ssh_daemon = 'SunSSH';
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($verbose) {
|
if ($verbose) {
|
||||||
print STDERR "ssh_daemon: $ssh_daemon\n";
|
print STDERR "ssh_daemon: $ssh_daemon\n";
|
||||||
print STDERR "ssh_ver_major: $ssh_ver_major\n";
|
print STDERR "ssh_ver_major: $ssh_ver_major\n";
|
||||||
@@ -131,16 +138,23 @@ if ($verbose) {
|
|||||||
print STDERR "ssh_ver_patch: $ssh_ver_patch\n";
|
print STDERR "ssh_ver_patch: $ssh_ver_patch\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Verify minimum OpenSSH version.
|
# Verify minimum SSH daemon version.
|
||||||
if (($ssh_daemon !~ /OpenSSH/) || (10 * $ssh_ver_major + $ssh_ver_minor < 37)) {
|
my $sshd_ver_ok = 1;
|
||||||
if(!$ssh_daemon) {
|
if(($ssh_daemon =~ /OpenSSH/) && (10 * $ssh_ver_major + $ssh_ver_minor < 36)) {
|
||||||
print "SSH server daemon found is not an OpenSSH daemon\n";
|
print "SSH server daemon found is OpenSSH $ssh_ver_major.$ssh_ver_minor\n";
|
||||||
chomp($tmpstr = qx($sshd -V 2>&1));
|
$sshd_ver_ok = 0;
|
||||||
print "$tmpstr\n";
|
}
|
||||||
}
|
if(($ssh_daemon =~ /SunSSH/) && (10 * $ssh_ver_major + $ssh_ver_minor < 11)) {
|
||||||
else {
|
print "SSH server daemon found is SunSSH $ssh_ver_major.$ssh_ver_minor\n";
|
||||||
print "SSH server daemon found is OpenSSH $ssh_ver_major.$ssh_ver_minor\n";
|
$sshd_ver_ok = 0;
|
||||||
}
|
}
|
||||||
|
if(!$ssh_daemon) {
|
||||||
|
print "SSH server daemon found is not OpenSSH nor SunSSH\n";
|
||||||
|
chomp($tmpstr = qx($sshd -V 2>&1));
|
||||||
|
print "$tmpstr\n";
|
||||||
|
$sshd_ver_ok = 0;
|
||||||
|
}
|
||||||
|
if(!$sshd_ver_ok) {
|
||||||
print "SCP, SFTP and SOCKS tests require OpenSSH 3.7 or later\n";
|
print "SCP, SFTP and SOCKS tests require OpenSSH 3.7 or later\n";
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user