]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Remove auth_worker_max_count_setting
authorKarl Fleischmann <karl.fleischmann@open-xchange.com>
Fri, 18 Feb 2022 15:33:01 +0000 (16:33 +0100)
committerKarl Fleischmann <karl.fleischmann@open-xchange.com>
Wed, 23 Mar 2022 15:02:05 +0000 (16:02 +0100)
Replace obsolete `auth_worker_max_count` setting with `service
auth-worker { process_limit }`.

doc/example-config/conf.d/10-auth.conf
src/auth/auth-settings.c
src/auth/auth-settings.h
src/config/old-set-parser.c

index 3e9c4e4dc4780d671a5d5a159e04fbc1141b3379..af58f64bd289a6234a3820513425d84ff041e7ec 100644 (file)
 # Username to use for users logging in with ANONYMOUS SASL mechanism
 #auth_anonymous_username = anonymous
 
-# Maximum number of dovecot-auth worker processes. They're used to execute
-# blocking passdb and userdb queries (eg. MySQL and PAM). They're
-# automatically created and destroyed as needed.
-#auth_worker_max_count = 30
-
 # Host name to use in GSSAPI principal names. The default is to use the
 # name returned by gethostname(). Use "$ALL" (with quotes) to allow all keytab
 # entries.
index 6be794660dddc5c1fb509c61330888f742926257..a3ba8b63857ab2e3b7c01db8ae34cc67b52aa0d6 100644 (file)
@@ -266,8 +266,6 @@ static const struct setting_define auth_setting_defines[] = {
        DEF(BOOL, ssl_username_from_cert),
        DEF(BOOL, use_winbind),
 
-       DEF(UINT, worker_max_count),
-
        DEFLIST(passdbs, "passdb", &auth_passdb_setting_parser_info),
        DEFLIST(userdbs, "userdb", &auth_userdb_setting_parser_info),
 
@@ -328,8 +326,6 @@ static const struct auth_settings auth_default_settings = {
 
        .use_winbind = FALSE,
 
-       .worker_max_count = 30,
-
        .passdbs = ARRAY_INIT,
        .userdbs = ARRAY_INIT,
 
@@ -429,11 +425,6 @@ static bool auth_settings_check(void *_set, pool_t pool,
        if (set->debug)
                set->verbose = TRUE;
 
-       if (set->worker_max_count == 0) {
-               *error_r = "auth_worker_max_count must be above zero";
-               return FALSE;
-       }
-
        if (set->cache_size > 0 && set->cache_size < 1024) {
                /* probably a configuration error.
                   older versions used megabyte numbers */
index 51d29f9b07fd1753ce40d0d17d674e1e580ff897..fc4ec7008efa61038c4520d3b163ba82e803d56b 100644 (file)
@@ -76,8 +76,6 @@ struct auth_settings {
        bool ssl_username_from_cert;
        bool use_winbind;
 
-       unsigned int worker_max_count;
-
        /* settings that don't have auth_ prefix: */
        ARRAY(struct auth_passdb_settings *) passdbs;
        ARRAY(struct auth_userdb_settings *) userdbs;
index 89c05292f7c14941cc60145fe5cda6fb01c5881a..5725b75575945699db326d6f54d294fb307edc4a 100644 (file)
@@ -274,6 +274,15 @@ old_settings_handle_root(struct config_parser_context *ctx,
                obsolete(ctx, "%s has been removed", key);
                return TRUE;
        }
+       if (strcmp(key, "auth_worker_max_count") == 0) {
+               obsolete(ctx,
+                        "%s has been replaced with service auth-worker { process_limit }",
+                        key);
+               config_apply_line(ctx, key,
+                                 t_strdup_printf("service/auth-worker/process_limit=%s", value),
+                                 NULL);
+               return TRUE;
+       }
        if (ctx->old->auth_section == 1) {
                if (!str_begins_with(key, "auth_"))
                        key = t_strconcat("auth_", key, NULL);