aboutsummaryrefslogtreecommitdiff
path: root/src/auth.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-06-18 16:42:33 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-06-18 16:42:33 +0200
commit5d05aec2efd2f5026b8eb4f2c0279521d564e4b8 (patch)
tree257973e049a2b0bf3981e5c1df5dc8f0099c6874 /src/auth.c
parent6306bee86cd8aa7967c7507ede40560fcf2ae935 (diff)
downloadlibssh-5d05aec2efd2f5026b8eb4f2c0279521d564e4b8.tar.gz
libssh-5d05aec2efd2f5026b8eb4f2c0279521d564e4b8.tar.xz
libssh-5d05aec2efd2f5026b8eb4f2c0279521d564e4b8.zip
auth: Cleanup the agent return code.
Diffstat (limited to 'src/auth.c')
-rw-r--r--src/auth.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/auth.c b/src/auth.c
index 5b8f748f..f44f24af 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -1107,13 +1107,11 @@ int ssh_userauth_publickey_auto(ssh_session session,
state = session->auth_auto_state;
if (state->state == SSH_AUTH_AUTO_STATE_NONE) {
#ifndef _WIN32
- /* Try authentication with ssh-agent first */
+ /* Try authentication with ssh-agent first */
rc = ssh_userauth_agent(session, username);
- if (rc == SSH_AUTH_SUCCESS) {
+ if (rc == SSH_AUTH_SUCCESS || rc == SSH_AUTH_AGAIN) {
return rc;
}
- if (rc == SSH_AUTH_AGAIN)
- return rc;
#endif
state->state = SSH_AUTH_AUTO_STATE_PUBKEY;
}