Skip to content

Commit

Permalink
Re-add host to "Login attempt with wrong user" log
Browse files Browse the repository at this point in the history
As discussed and fixed in mkj#316 for "nonexistent user" logs, this commit additionally reverts mkj#83 for "wrong user" logs, to re-add the remote host to the those log entries.

Signed-off-by: MichaIng <micha@dietpi.com>
  • Loading branch information
MichaIng committed Dec 30, 2024
1 parent 7e1b2db commit a15f28c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/svr-auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,9 @@ static int checkusername(const char *username, unsigned int userlen) {
if (!(DROPBEAR_SVR_MULTIUSER && uid == 0) && uid != ses.authstate.pw_uid) {
TRACE(("running as nonroot, only server uid is allowed"))
dropbear_log(LOG_WARNING,
"Login attempt with wrong user %s",
ses.authstate.pw_name);
"Login attempt with wrong user %s from %s",
ses.authstate.pw_name,
svr_ses.addrstring);
ses.authstate.checkusername_failed = 1;
return DROPBEAR_FAILURE;
}
Expand Down

0 comments on commit a15f28c

Please sign in to comment.