diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-09-09 13:59:38 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-09-09 13:59:38 +0200 |
commit | 6c21211c3842ae4c86d7ad7eba05b3268fa117ac (patch) | |
tree | 5e07b509253565a7bcd1a430e9f3b8f72c349814 | |
parent | 53ba8c9e8b834eb005daba76d7ee319cde990248 (diff) | |
parent | 241414ee33c627092a483bc56d46f5a0d9c16ca9 (diff) | |
download | libgit2-6c21211c3842ae4c86d7ad7eba05b3268fa117ac.tar.gz |
Merge pull request #3379 from theseion/additional_libssh2_error_reporting
report libssh2 error if list of authentication methods can't be retrieved
-rw-r--r-- | src/transports/ssh.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/transports/ssh.c b/src/transports/ssh.c index 8f5a7164b..ffa4a24a7 100644 --- a/src/transports/ssh.c +++ b/src/transports/ssh.c @@ -756,8 +756,10 @@ static int list_auth_methods(int *out, LIBSSH2_SESSION *session, const char *use list = libssh2_userauth_list(session, username, strlen(username)); /* either error, or the remote accepts NONE auth, which is bizarre, let's punt */ - if (list == NULL && !libssh2_userauth_authenticated(session)) + if (list == NULL && !libssh2_userauth_authenticated(session)) { + ssh_error(session, "Failed to retrieve list of SSH authentication methods"); return -1; + } ptr = list; while (ptr) { |