From 241414ee33c627092a483bc56d46f5a0d9c16ca9 Mon Sep 17 00:00:00 2001 From: Max Leske Date: Fri, 14 Aug 2015 15:42:59 +0200 Subject: [PATCH] added a single line of additional error reporting from libssh2 when failing to retrieve the list of authentication methods --- src/transports/ssh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) {