mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
auth: Log the username used for authentication
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 7e235f8748)
This commit is contained in:
@@ -1294,6 +1294,11 @@ int ssh_userauth_publickey_auto(ssh_session session,
|
|||||||
if (session == NULL) {
|
if (session == NULL) {
|
||||||
return SSH_AUTH_ERROR;
|
return SSH_AUTH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SSH_LOG(SSH_LOG_INFO,
|
||||||
|
"Starting authentication as a user %s",
|
||||||
|
username ? username : session->opts.username);
|
||||||
|
|
||||||
if (! (session->opts.flags & SSH_OPT_FLAG_PUBKEY_AUTH)) {
|
if (! (session->opts.flags & SSH_OPT_FLAG_PUBKEY_AUTH)) {
|
||||||
session->auth.supported_methods &= ~SSH_AUTH_METHOD_PUBLICKEY;
|
session->auth.supported_methods &= ~SSH_AUTH_METHOD_PUBLICKEY;
|
||||||
return SSH_AUTH_DENIED;
|
return SSH_AUTH_DENIED;
|
||||||
|
|||||||
Reference in New Issue
Block a user