1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

auth: Improve pending call error messages

This can help when debugging in the future

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Anderson Toshiyuki Sasaki
2018-07-12 13:14:10 +02:00
parent ec6df9896a
commit 6e74c6c1dc

View File

@@ -355,7 +355,8 @@ int ssh_userauth_none(ssh_session session, const char *username) {
goto pending; goto pending;
default: default:
ssh_set_error(session, SSH_FATAL, ssh_set_error(session, SSH_FATAL,
"Wrong state during pending SSH call"); "Wrong state (%d) during pending SSH call",
session->pending_call_state);
return SSH_AUTH_ERROR; return SSH_AUTH_ERROR;
} }
@@ -450,7 +451,8 @@ int ssh_userauth_try_publickey(ssh_session session,
default: default:
ssh_set_error(session, ssh_set_error(session,
SSH_FATAL, SSH_FATAL,
"Wrong state during pending SSH call"); "Wrong state (%d) during pending SSH call",
session->pending_call_state);
return SSH_ERROR; return SSH_ERROR;
} }
@@ -1119,7 +1121,8 @@ int ssh_userauth_password(ssh_session session,
default: default:
ssh_set_error(session, ssh_set_error(session,
SSH_FATAL, SSH_FATAL,
"Wrong state during pending SSH call"); "Wrong state (%d) during pending SSH call",
session->pending_call_state);
return SSH_ERROR; return SSH_ERROR;
} }
@@ -1763,7 +1766,8 @@ int ssh_userauth_gssapi(ssh_session session) {
default: default:
ssh_set_error(session, ssh_set_error(session,
SSH_FATAL, SSH_FATAL,
"Wrong state during pending SSH call"); "Wrong state (%d) during pending SSH call",
session->pending_call_state);
return SSH_ERROR; return SSH_ERROR;
} }