mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +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;
|
||||
ssh_string_free_char(state->comment);
|
||||
state->comment = NULL;
|
||||
if (rc == SSH_AUTH_ERROR) {
|
||||
if (rc == SSH_AUTH_ERROR || rc == SSH_AUTH_PARTIAL) {
|
||||
ssh_agent_state_free (session->agent_state);
|
||||
session->agent_state = NULL;
|
||||
return rc;
|
||||
@@ -943,7 +943,9 @@ int ssh_userauth_publickey_auto(ssh_session session,
|
||||
#ifndef _WIN32
|
||||
/* Try authentication with ssh-agent first */
|
||||
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;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user