aboutsummaryrefslogtreecommitdiff
path: root/tests/sshserver.pl
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-11-26 02:45:24 +0000
committerYang Tse <yangsita@gmail.com>2007-11-26 02:45:24 +0000
commitd59841618d79385ccc151025d8035ea11acbbdac (patch)
tree54ae853b28ec10e4eb06b46ebb1d07489b8b0e81 /tests/sshserver.pl
parent8d3964782ae808b07c161616124ad05c756e4368 (diff)
Temporary change to better debug startup failures
of test suite ssh and socks servers.
Diffstat (limited to 'tests/sshserver.pl')
-rw-r--r--tests/sshserver.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/sshserver.pl b/tests/sshserver.pl
index 049200941..103ab142a 100644
--- a/tests/sshserver.pl
+++ b/tests/sshserver.pl
@@ -13,6 +13,7 @@ use strict;
use File::Spec;
my $verbose=0; # set to 1 for debugging
+my $showfiles=0;
my $port = 8999; # just our default, weird enough
my $listenaddr = "127.0.0.1"; # address on which to listen
@@ -136,12 +137,18 @@ chomp($tmpstr = qx($sshd -V 2>&1 | grep OpenSSH));
if ($tmpstr =~ /OpenSSH[_-](\d+)\.(\d+)(\.(\d+))*/) {
($ssh_ver_major, $ssh_ver_minor, $ssh_ver_patch) = ($1, $2, $4);
$ssh_daemon = 'OpenSSH';
+ if(10 * $ssh_ver_major + $ssh_ver_minor == 36) {
+ $showfiles=1;
+ }
}
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(10 * $ssh_ver_major + $ssh_ver_minor == 11) {
+ $showfiles=1;
+ }
}
}
if ($verbose) {
@@ -322,6 +329,11 @@ elsif ($verbose && ($cmdretval >> 8)) {
printf("$sshd exited with %d \n", $cmdretval >> 8);
}
+if($showfiles) {
+ displayfile("log/sshd.log");
+ displayfile("$conffile");
+}
+
unlink $conffile;
exit $cmdretval >> 8;