aboutsummaryrefslogtreecommitdiff
path: root/src/auth.c
diff options
context:
space:
mode:
authorNicolas Viennot <nicolas@viennot.biz>2013-06-14 23:51:47 -0400
committerAndreas Schneider <asn@cryptomilk.org>2013-06-18 16:39:31 +0200
commit6306bee86cd8aa7967c7507ede40560fcf2ae935 (patch)
treee5653511c684035b7208dd19e1f9b2b7fc14fec8 /src/auth.c
parent59dcebd60424ee3f0a7c1cca1d661d5e982b48b3 (diff)
downloadlibssh-6306bee86cd8aa7967c7507ede40560fcf2ae935.tar.gz
libssh-6306bee86cd8aa7967c7507ede40560fcf2ae935.tar.xz
libssh-6306bee86cd8aa7967c7507ede40560fcf2ae935.zip
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".
Diffstat (limited to 'src/auth.c')
-rw-r--r--src/auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/auth.c b/src/auth.c
index 9d099a53..5b8f748f 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -1109,7 +1109,7 @@ 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_ERROR || rc == SSH_AUTH_SUCCESS) {
+ if (rc == SSH_AUTH_SUCCESS) {
return rc;
}
if (rc == SSH_AUTH_AGAIN)