Skip to content

Commit

Permalink
auth: auth_request_log_unknown_user() to call common auth_request_log…
Browse files Browse the repository at this point in the history
…_login_failure()

Separate implementation of auth_request_log_unknown_user() is
replaced with call to auth_request_log_login_failure()
NOTE: behavior of the auth_request_log_unknown_user() is changed and
is in line with auth_request_log_password_mismatch()
  • Loading branch information
Sergey-Kitov committed Aug 15, 2017
1 parent 3742e38 commit bd18d17
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/auth/auth-request.c
Expand Up @@ -2449,27 +2449,7 @@ void auth_request_log_password_mismatch(struct auth_request *request,
void auth_request_log_unknown_user(struct auth_request *request,
const char *subsystem)
{
string_t *str;

if (strcmp(request->set->verbose_passwords, "no") == 0 ||
!request->set->verbose) {
auth_request_log_info(request, subsystem, "unknown user");
return;
}
str = t_str_new(128);
get_log_prefix(str, request, subsystem);
str_append(str, "unknown user ");

auth_request_append_password(request, str);

if (request->userdb_lookup) {
if (request->userdb->next != NULL)
str_append(str, " - trying the next userdb");
} else {
if (request->passdb->next != NULL)
str_append(str, " - trying the next passdb");
}
i_info("%s", str_c(str));
auth_request_log_login_failure(request, subsystem, "unknown user");
}

void auth_request_log_login_failure(struct auth_request *request,
Expand Down

0 comments on commit bd18d17

Please sign in to comment.