1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-13 04:42:23 +03:00

Fixed setting knownhosts in ssh_is_server_known().

This commit is contained in:
Andreas Schneider
2009-10-29 12:10:44 +01:00
parent 89f0311927
commit cce34a6176

View File

@@ -1386,11 +1386,13 @@ int ssh_is_server_known(ssh_session session) {
enter_function(); enter_function();
if (ssh_options_set(session, SSH_OPTIONS_KNOWNHOSTS, NULL) < 0) { if (session->knownhosts == NULL) {
ssh_set_error(session, SSH_REQUEST_DENIED, if (ssh_options_set(session, SSH_OPTIONS_KNOWNHOSTS, NULL) < 0) {
"Can't find a known_hosts file"); ssh_set_error(session, SSH_REQUEST_DENIED,
leave_function(); "Can't find a known_hosts file");
return SSH_SERVER_FILE_NOT_FOUND; leave_function();
return SSH_SERVER_FILE_NOT_FOUND;
}
} }
if (session->host == NULL) { if (session->host == NULL) {