Removed explicit "user login failed" stuff from SSH auth.

This would result in the lasterr string getting polluted with password
failure messages if the SSH auth is not the last auth method tried. Now
only actual failures will be reported.
This commit is contained in:
Chris 2012-03-19 10:34:42 +00:00
parent 779a4ca040
commit b7b0b3e321

View File

@ -114,15 +114,9 @@ sub authenticate {
# Did the user log in?
} elsif($resp =~ /Welcome/ || $resp =~ /Last\s*login/s) {
return 1;
# something broke, just not /hideously/
} else {
# Fix the simple 'Password:' prompt response...
$resp =~ s/^Password:$/Incorrect username or password./;
$auth -> {"lasterr"} .= "ssh login to ".$self -> {"server"}." failed. Response was: $resp\n";
}
# Note that password failures ARE NOT reported - just this auth method fails.
return 0;
}