]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Rename auth-worker-server -> auth-worker-connection
authorKarl Fleischmann <karl.fleischmann@open-xchange.com>
Tue, 1 Mar 2022 10:10:08 +0000 (11:10 +0100)
committerKarl Fleischmann <karl.fleischmann@open-xchange.com>
Wed, 23 Mar 2022 15:02:05 +0000 (16:02 +0100)
The previous naming convention of auth-worker-server and
auth-worker-client was confusing enough to justify a rename.

src/auth/Makefile.am
src/auth/auth-worker-connection.c [moved from src/auth/auth-worker-server.c with 96% similarity]
src/auth/auth-worker-connection.h [moved from src/auth/auth-worker-server.h with 58% similarity]
src/auth/main.c
src/auth/passdb-blocking.c
src/auth/passdb-cache.c
src/auth/passdb.c
src/auth/userdb-blocking.c
src/auth/userdb.c

index 7e149c1c0550af89abfb2e4b8f95ab2954298b56..774ccd796999d654496ccbdbb7075af08a154dfd 100644 (file)
@@ -104,7 +104,7 @@ libauth_la_SOURCES = \
        auth-fields.c \
        auth-token.c \
        auth-worker-client.c \
-       auth-worker-server.c \
+       auth-worker-connection.c \
        db-checkpassword.c \
        db-dict.c \
        db-dict-cache-key.c \
@@ -171,7 +171,7 @@ headers = \
        auth-fields.h \
        auth-token.h \
        auth-worker-client.h \
-       auth-worker-server.h \
+       auth-worker-connection.h \
        db-dict.h \
        db-ldap.h \
        db-sql.h \
similarity index 96%
rename from src/auth/auth-worker-server.c
rename to src/auth/auth-worker-connection.c
index dddc7865497c48242a69f405aeae6821c071e1dc..9f4d2c68e287dbb766144d859f3741d61ba2db9f 100644 (file)
@@ -14,7 +14,7 @@
 #include "eacces-error.h"
 #include "auth-request.h"
 #include "auth-worker-client.h"
-#include "auth-worker-server.h"
+#include "auth-worker-connection.h"
 
 #include <unistd.h>
 
@@ -181,7 +181,8 @@ static int auth_worker_handshake_args(struct connection *conn,
        return 1;
 }
 
-static void auth_worker_server_connected(struct connection *conn, bool success)
+static void auth_worker_connection_connected(struct connection *conn,
+                                            bool success)
 {
        if (!success)
                return;
@@ -444,7 +445,7 @@ static void worker_input_resume(struct auth_worker_connection *worker)
        connection_input_resume(&worker->conn);
 }
 
-static const struct connection_settings auth_worker_server_settings =
+static const struct connection_settings auth_worker_connection_settings =
 {
        .service_name_in = AUTH_WORKER_NAME,
        .service_name_out = AUTH_MASTER_NAME,
@@ -456,9 +457,9 @@ static const struct connection_settings auth_worker_server_settings =
        .unix_client_connect_msecs = AUTH_WORKER_CONNECT_RETRY_TIMEOUT_MSECS,
 };
 
-static const struct connection_vfuncs auth_worker_server_funcs =
+static const struct connection_vfuncs auth_worker_connection_funcs =
 {
-       .client_connected = auth_worker_server_connected,
+       .client_connected = auth_worker_connection_connected,
        .destroy = auth_worker_destroy,
        .handshake_args = auth_worker_handshake_args,
        .input_args = worker_input_args,
@@ -499,7 +500,7 @@ auth_worker_call(pool_t pool, const char *username, const char *data,
        return worker;
 }
 
-void auth_worker_server_resume_input(struct auth_worker_connection *worker)
+void auth_worker_connection_resume_input(struct auth_worker_connection *worker)
 {
        if (worker->request == NULL) {
                /* request was just finished, don't try to resume it */
@@ -513,18 +514,18 @@ void auth_worker_server_resume_input(struct auth_worker_connection *worker)
        }
 }
 
-void auth_worker_server_init(void)
+void auth_worker_connection_init(void)
 {
        worker_socket_path = "auth-worker";
 
        i_array_init(&worker_request_array, 128);
        worker_request_queue = aqueue_init(&worker_request_array.arr);
 
-       connections = connection_list_init(&auth_worker_server_settings,
-                                          &auth_worker_server_funcs);
+       connections = connection_list_init(&auth_worker_connection_settings,
+                                          &auth_worker_connection_funcs);
 }
 
-void auth_worker_server_deinit(void)
+void auth_worker_connection_deinit(void)
 {
        connection_list_deinit(&connections);
 
similarity index 58%
rename from src/auth/auth-worker-server.h
rename to src/auth/auth-worker-connection.h
index 6d166f1f8b3b13de9001f05a98b3532cd7374904..f8ab7dc95e9652d5a2eb1f3f8e03d8d1db96d8b2 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef AUTH_WORKER_SERVER_H
-#define AUTH_WORKER_SERVER_H
+#ifndef AUTH_WORKER_CONNECTION_H
+#define AUTH_WORKER_CONNECTION_H
 
 struct auth_request;
 struct auth_stream_reply;
@@ -9,9 +9,9 @@ typedef bool auth_worker_callback_t(const char *const *args, void *context);
 struct auth_worker_connection * ATTR_NOWARN_UNUSED_RESULT
 auth_worker_call(pool_t pool, const char *username, const char *data,
                 auth_worker_callback_t *callback, void *context);
-void auth_worker_server_resume_input(struct auth_worker_connection *conn);
+void auth_worker_connection_resume_input(struct auth_worker_connection *conn);
 
-void auth_worker_server_init(void);
-void auth_worker_server_deinit(void);
+void auth_worker_connection_init(void);
+void auth_worker_connection_deinit(void);
 
 #endif
index f1b3f4339fb2a07af856bfb3aec5ca3d12307684..71dfd9311b65add4de4bba540c6a05e48ef32957 100644 (file)
@@ -26,8 +26,8 @@
 #include "auth-penalty.h"
 #include "auth-token.h"
 #include "auth-request-handler.h"
-#include "auth-worker-server.h"
 #include "auth-worker-client.h"
+#include "auth-worker-connection.h"
 #include "auth-master-connection.h"
 #include "auth-client-connection.h"
 #include "auth-policy.h"
@@ -237,7 +237,7 @@ static void main_init(void)
        auth_worker_refresh_proctitle("");
 
        child_wait_init();
-       auth_worker_server_init();
+       auth_worker_connection_init();
        auths_init();
        auth_request_handler_init();
        auth_policy_init();
@@ -270,7 +270,7 @@ static void main_deinit(void)
                auth_penalty_deinit(&auth_penalty);
        }
        /* deinit auth workers, which aborts pending requests */
-        auth_worker_server_deinit();
+        auth_worker_connection_deinit();
        /* deinit passdbs and userdbs. it aborts any pending async requests. */
        auths_deinit();
        /* flush pending requests */
index 7ba5d10c82adf540aa8aa15c272a15851f498eb4..7beb6eb8a39e6c21668b5b0d69f57ca54f0cd2b9 100644 (file)
@@ -3,7 +3,7 @@
 #include "auth-common.h"
 #include "str.h"
 #include "strescape.h"
-#include "auth-worker-server.h"
+#include "auth-worker-connection.h"
 #include "password-scheme.h"
 #include "passdb.h"
 #include "passdb-blocking.h"
index 9bf15c011c889c0084e4f8fbf5eb7131fce5d522..7631556196a07e5706710a43efe264a3b22a7009 100644 (file)
@@ -4,7 +4,7 @@
 #include "str.h"
 #include "strescape.h"
 #include "restrict-process-size.h"
-#include "auth-worker-server.h"
+#include "auth-worker-connection.h"
 #include "password-scheme.h"
 #include "passdb.h"
 #include "passdb-cache.h"
index 84798933aa0250a09afdeaf5946e1990b97425e8..e15825caeca5fe0b20891d2eb106580902ca59e6 100644 (file)
@@ -3,7 +3,7 @@
 #include "auth-common.h"
 #include "array.h"
 #include "password-scheme.h"
-#include "auth-worker-server.h"
+#include "auth-worker-connection.h"
 #include "passdb.h"
 
 static ARRAY(struct passdb_module_interface *) passdb_interfaces;
index 35e19e70993c88a18f2d52a19d60f5178917e119..fc0be321096f99e6625629b10a732faac51870c1 100644 (file)
@@ -2,7 +2,7 @@
 
 #include "auth-common.h"
 #include "str.h"
-#include "auth-worker-server.h"
+#include "auth-worker-connection.h"
 #include "userdb.h"
 #include "userdb-blocking.h"
 
@@ -120,7 +120,7 @@ void userdb_blocking_iter_next(struct userdb_iterate_context *_ctx)
                (struct blocking_userdb_iterate_context *)_ctx;
 
        ctx->next = TRUE;
-       auth_worker_server_resume_input(ctx->conn);
+       auth_worker_connection_resume_input(ctx->conn);
 }
 
 int userdb_blocking_iter_deinit(struct userdb_iterate_context **_ctx)
@@ -134,6 +134,6 @@ int userdb_blocking_iter_deinit(struct userdb_iterate_context **_ctx)
        /* iter_callback() may still be called */
        ctx->destroyed = TRUE;
 
-       auth_worker_server_resume_input(ctx->conn);
+       auth_worker_connection_resume_input(ctx->conn);
        return ret;
 }
index 21751f92970b006da00dfd07c7ea8a0639b2374f..738b6d623dd054c91675fd5e757a1958c233a3d9 100644 (file)
@@ -3,7 +3,7 @@
 #include "auth-common.h"
 #include "array.h"
 #include "ipwd.h"
-#include "auth-worker-server.h"
+#include "auth-worker-connection.h"
 #include "userdb.h"
 
 static ARRAY(struct userdb_module_interface *) userdb_interfaces;