]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Fixed using auth worker processes.
authorTimo Sirainen <tss@iki.fi>
Tue, 12 May 2009 18:04:31 +0000 (14:04 -0400)
committerTimo Sirainen <tss@iki.fi>
Tue, 12 May 2009 18:04:31 +0000 (14:04 -0400)
--HG--
branch : HEAD

dovecot-master-example.conf
src/auth/auth-worker-server.c

index 1a6cae0ee2dc5a1e62480654ca77ed806d0c0b28..7e8037820049c0bfff8fa4b25f96c893448c8793 100644 (file)
@@ -96,10 +96,11 @@ service pop3 {
   executable = pop3
 }
 
-#service auth-worker {
-#  executable = dovecot-auth -w
-#
-#  unix_listener {
-#    path = auth-worker
-#  }
-#}
+service auth-worker {
+  executable = dovecot-auth -w
+  client_limit = 1
+
+  unix_listener {
+    path = auth-worker
+  }
+}
index 14484d120b90a3ee7a5746256c02314b374d4fbc..13e472f196a9c62ca309504a35e9b0c77f6dcceb 100644 (file)
@@ -48,7 +48,7 @@ static ARRAY_DEFINE(worker_request_array, struct auth_worker_request *);
 static struct aqueue *worker_request_queue;
 static time_t auth_worker_last_warn;
 
-static char *worker_socket_path;
+static const char *worker_socket_path;
 
 static void worker_input(struct auth_worker_connection *conn);
 static void auth_worker_destroy(struct auth_worker_connection **conn,
@@ -337,17 +337,12 @@ void auth_worker_call(struct auth_request *auth_request,
 
 void auth_worker_server_init(struct auth *auth)
 {
-       const char *env;
-
        if (array_is_created(&connections)) {
                /* already initialized */
                return;
        }
 
-       env = getenv("AUTH_WORKER_PATH");
-       if (env == NULL)
-               i_fatal("AUTH_WORKER_PATH environment not set");
-       worker_socket_path = i_strdup(env);
+       worker_socket_path = "auth-worker";
 
        i_array_init(&worker_request_array, 128);
        worker_request_queue = aqueue_init(&worker_request_array.arr);
@@ -372,5 +367,4 @@ void auth_worker_server_deinit(void)
 
        aqueue_deinit(&worker_request_queue);
        array_free(&worker_request_array);
-       i_free(worker_socket_path);
 }