[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 118/125: SSH: Fix state machine for ssh-agent authe
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 118/125: SSH: Fix state machine for ssh-agent authentication |
Date: |
Sun, 21 Jan 2018 23:42:53 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit ddafd45af12a128a99bfe4d35c58809e22d75c52
Author: Michael Gmelin <address@hidden>
AuthorDate: Thu Jan 18 01:28:19 2018 +0100
SSH: Fix state machine for ssh-agent authentication
In case an identity didn't match[0], the state machine would fail in
state SSH_AUTH_AGENT instead of progressing to the next identity in
ssh-agent. As a result, ssh-agent authentication only worked if the
identity required happened to be the first added to ssh-agent.
This was introduced as part of commit c4eb10e2f06fbd6cc904f1d78e4, which
stated that the "else" statement was required to prevent getting stuck
in state SSH_AUTH_AGENT. Given the state machine's logic and libssh2's
interface I couldn't see how this could happen or reproduce it and I
also couldn't find a more detailed description of the problem which
would explain a test case to reproduce the problem this was supposed to
fix.
[0] libssh2_agent_userauth returning LIBSSH2_ERROR_AUTHENTICATION_FAILED
Closes #2248
---
lib/ssh.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/ssh.c b/lib/ssh.c
index 6516c5d37..a86ed706e 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -955,11 +955,11 @@ static CURLcode ssh_statemach_act(struct connectdata
*conn, bool *block)
sshc->sshagent_identity);
if(rc < 0) {
- if(rc != LIBSSH2_ERROR_EAGAIN)
+ if(rc != LIBSSH2_ERROR_EAGAIN) {
/* tried and failed? go to next identity */
sshc->sshagent_prev_identity = sshc->sshagent_identity;
- else
- break;
+ }
+ break;
}
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 77/125: build-openssl.bat: Added support for VC15, (continued)
- [GNUnet-SVN] [gnurl] 77/125: build-openssl.bat: Added support for VC15, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 94/125: progress: calculate transfer speed on milliseconds if possible, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 80/125: winbuild: Added support for VC15, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 116/125: openssl: fix the libressl build again, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 103/125: HTTP: bail out on negative Content-Length: values, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 114/125: curl_fnmatch: only allow 5 '*' sections in a single pattern, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 75/125: examples/rtsp: fix error handling macros, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 117/125: openssl: fix potential memory leak in SSLKEYLOGFILE logic, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 12/125: libssh: added SFTP support, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 122/125: TODO: two possible name resolver improvements, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 118/125: SSH: Fix state machine for ssh-agent authentication,
gnunet <=
- [GNUnet-SVN] [gnurl] 07/125: Added support for libssh SSH SCP back-end, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 42/125: curl.h: remove incorrect comment about ERRORBUFFER, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 46/125: CURLOPT_PRIVATE.3: fix grammar, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 39/125: BINDINGS: another PostgreSQL client, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 47/125: sftp: allow quoted commands to use relative paths, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 38/125: CONNECT: keep close connection flag in http_connect_state struct, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 78/125: build-wolfssl.bat: Added support for VC15, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 90/125: openssl: fix memory leak of SSLKEYLOGFILE filename, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 98/125: http2: fix incorrect trailer buffer size, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 70/125: rand: add a clang-analyzer work-around, gnunet, 2018/01/21