]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Fix user iteration when there were many users
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 4 Dec 2025 14:00:39 +0000 (16:00 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Fri, 28 Nov 2025 14:14:55 +0000 (14:14 +0000)
The iteration stopped in the middle and an error was logged:
auth: Error: auth-worker: Aborted LIST request for *: Shutting down

Broken by f591498845fd7b5e11f1085b6e1f5e34dcc84767

src/auth/auth-worker-connection.c
src/auth/auth-worker-connection.h

index 775413085fb38d16b473232108770e42c4f01136..3090e9618207b5afe7c6747486e93d283bf2ab19 100644 (file)
@@ -341,7 +341,8 @@ static int auth_worker_request_handle(struct auth_worker_connection *worker,
        if (!_request->callback(worker, args, _request->context)) {
                worker->timeout_pending_resume = FALSE;
                timeout_remove(&worker->to_lookup);
-               return -1;
+               connection_input_halt(&worker->conn);
+               return 0;
        }
        return 1;
 }
index bdce677dbfe0fdd46c60d7e005220e74390651ad..e08a17c7b45df336897e009ab79b2fbd1ff9b09f 100644 (file)
@@ -5,6 +5,9 @@ struct auth_request;
 struct auth_stream_reply;
 struct auth_worker_connection;
 
+/* Returns TRUE if worker input can be read more, FALSE if input
+   reading should be stopped until auth_worker_connection_resume_input() is
+   called again. */
 typedef bool auth_worker_callback_t(struct auth_worker_connection *conn,
                                    const char *const *args, void *context);