diff options
author | Yang Tse <yangsita@gmail.com> | 2007-11-19 17:20:32 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2007-11-19 17:20:32 +0000 |
commit | 5376d1047ce33e1e4ddf140bc9a5765462ee7673 (patch) | |
tree | 545c3d9b0536af84489264c87b3b45419bc1e3ee /tests/sshserver.pl | |
parent | 1746b57161e86afcab58b5a1a7d9500b06c39175 (diff) | |
download | curl-5376d1047ce33e1e4ddf140bc9a5765462ee7673.tar.gz |
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
Diffstat (limited to 'tests/sshserver.pl')
-rw-r--r-- | tests/sshserver.pl | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/tests/sshserver.pl b/tests/sshserver.pl index d20ae6935..563e9de72 100644 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -124,6 +124,13 @@ if ($tmpstr =~ /OpenSSH[_-](\d+)\.(\d+)(\.(\d+))*/) { ($ssh_ver_major, $ssh_ver_minor, $ssh_ver_patch) = ($1, $2, $4); $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) { print STDERR "ssh_daemon: $ssh_daemon\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"; } -# Verify minimum OpenSSH version. -if (($ssh_daemon !~ /OpenSSH/) || (10 * $ssh_ver_major + $ssh_ver_minor < 37)) { - if(!$ssh_daemon) { - print "SSH server daemon found is not an OpenSSH daemon\n"; - chomp($tmpstr = qx($sshd -V 2>&1)); - print "$tmpstr\n"; - } - else { - print "SSH server daemon found is OpenSSH $ssh_ver_major.$ssh_ver_minor\n"; - } +# Verify minimum SSH daemon version. +my $sshd_ver_ok = 1; +if(($ssh_daemon =~ /OpenSSH/) && (10 * $ssh_ver_major + $ssh_ver_minor < 36)) { + print "SSH server daemon found is OpenSSH $ssh_ver_major.$ssh_ver_minor\n"; + $sshd_ver_ok = 0; +} +if(($ssh_daemon =~ /SunSSH/) && (10 * $ssh_ver_major + $ssh_ver_minor < 11)) { + print "SSH server daemon found is SunSSH $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"; exit 1; } |