]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Log the same "user not found" error regardless of how many userdbs exist
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 11 Jan 2024 17:02:23 +0000 (12:02 -0500)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:11 +0000 (12:34 +0200)
If a passdb lookup succeeded, but userdb lookup fails with "user not found",
an error is logged. This error used to include the userdb prefix when there
was only a single userdb configured. However, this is just unnecessary extra
complexity and with one userdb it's not very useful anyway.

src/auth/auth-request.c

index fe84eb99eecaffedf58bab8bd852dbcb1b175631..4a0032154a23fbff2b1024130068740ef6a6b64e 100644 (file)
@@ -1606,14 +1606,7 @@ void auth_request_userdb_callback(enum userdb_result result,
        } else if (request->client_pid != 0) {
                /* this was an actual login attempt, the user should
                   have been found. */
-               if (auth_request_get_auth(request)->userdbs->next == NULL) {
-                       e_error(request->event,
-                               "%suser not found from userdb",
-                               auth_request_get_log_prefix_db(request));
-               } else {
-                       e_error(request->event,
-                               "user not found from any userdbs");
-               }
+               e_error(request->event, "user not found from any userdbs");
                result = USERDB_RESULT_USER_UNKNOWN;
        } else {
                result = USERDB_RESULT_USER_UNKNOWN;