Commit 567380cd authored by deuce's avatar deuce
Browse files

Actually, anything except failure to send credentials should count as a

bad login.
parent 5b49dab0
......@@ -5444,15 +5444,6 @@ NO_SSH:
GCESS(i, client_socket, sbbs->ssh_session, "getting channel type");
if (tnamelen != 7 || strnicmp(tname, "session", 7)) {
lprintf(LOG_INFO, "%04d SSH active channel '%s' is not 'session', disconnecting.", client_socket, tname);
identity = get_crypt_attribute(sbbs->ssh_session, CRYPT_SESSINFO_USERNAME);
p = get_crypt_attribute(sbbs->ssh_session, CRYPT_SESSINFO_PASSWORD);
sbbs->badlogin(identity, p);
if (identity != NULL)
free_crypt_attrstr(identity);
identity = NULL;
if (p != NULL)
free_crypt_attrstr(p);
p = NULL;
// Fail because there's no session.
ssh_failed = 3;
}
......@@ -5475,6 +5466,17 @@ NO_SSH:
}
}
if(ssh_failed) {
if (ssh_failed > 1) {
identity = get_crypt_attribute(sbbs->ssh_session, CRYPT_SESSINFO_USERNAME);
p = get_crypt_attribute(sbbs->ssh_session, CRYPT_SESSINFO_PASSWORD);
sbbs->badlogin(identity, p);
if (identity != NULL)
free_crypt_attrstr(identity);
identity = NULL;
if (p != NULL)
free_crypt_attrstr(p);
p = NULL;
}
cryptDestroySession(sbbs->ssh_session);
close_socket(client_socket);
continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment