1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

auth: If the agent fails, fall back to regular path

It's causing issues on MacOSX when ssh_agent_get_ident_count()
reports "Agent count: 0".
This commit is contained in:
Nicolas Viennot
2013-06-14 23:51:47 -04:00
committed by Andreas Schneider
parent 59dcebd604
commit 6306bee86c

View File

@@ -1109,7 +1109,7 @@ 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_ERROR || rc == SSH_AUTH_SUCCESS) { if (rc == SSH_AUTH_SUCCESS) {
return rc; return rc;
} }
if (rc == SSH_AUTH_AGAIN) if (rc == SSH_AUTH_AGAIN)