]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: auth_request_log_unknown_user() to call common auth_request_log_login_failure()
authorSergey Kitov <sergey.kitov@open-xchange.com>
Tue, 15 Aug 2017 08:09:07 +0000 (11:09 +0300)
committerSergey Kitov <sergey.kitov@open-xchange.com>
Tue, 15 Aug 2017 08:09:07 +0000 (11:09 +0300)
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()

src/auth/auth-request.c

index 12cfc6be40bc2bf4efebabd0377cc17a04761e98..cd014f6a7cb9fac0387a9ed05ea368c30bf2f263 100644 (file)
@@ -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,