mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
auth: Handle SSH_AUTH_PARTIAL in agent auth correctly
Thanks to Orion Poplawski. Fixes T82 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -842,7 +842,7 @@ int ssh_userauth_agent(ssh_session session,
|
|||||||
return rc;
|
return rc;
|
||||||
ssh_string_free_char(state->comment);
|
ssh_string_free_char(state->comment);
|
||||||
state->comment = NULL;
|
state->comment = NULL;
|
||||||
if (rc == SSH_AUTH_ERROR) {
|
if (rc == SSH_AUTH_ERROR || rc == SSH_AUTH_PARTIAL) {
|
||||||
ssh_agent_state_free (session->agent_state);
|
ssh_agent_state_free (session->agent_state);
|
||||||
session->agent_state = NULL;
|
session->agent_state = NULL;
|
||||||
return rc;
|
return rc;
|
||||||
@@ -943,7 +943,9 @@ int ssh_userauth_publickey_auto(ssh_session session,
|
|||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
/* Try authentication with ssh-agent first */
|
/* Try authentication with ssh-agent first */
|
||||||
rc = ssh_userauth_agent(session, username);
|
rc = ssh_userauth_agent(session, username);
|
||||||
if (rc == SSH_AUTH_SUCCESS || rc == SSH_AUTH_AGAIN) {
|
if (rc == SSH_AUTH_SUCCESS ||
|
||||||
|
rc == SSH_AUTH_PARTIAL ||
|
||||||
|
rc == SSH_AUTH_AGAIN ) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user