From: Karl Fleischmann Date: Fri, 18 Feb 2022 15:33:01 +0000 (+0100) Subject: auth: Remove auth_worker_max_count_setting X-Git-Tag: 2.4.0~4220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f81bfa72390e55ad4bc7bb49308cef4e476209db;p=thirdparty%2Fdovecot%2Fcore.git auth: Remove auth_worker_max_count_setting Replace obsolete `auth_worker_max_count` setting with `service auth-worker { process_limit }`. --- diff --git a/doc/example-config/conf.d/10-auth.conf b/doc/example-config/conf.d/10-auth.conf index 3e9c4e4dc4..af58f64bd2 100644 --- a/doc/example-config/conf.d/10-auth.conf +++ b/doc/example-config/conf.d/10-auth.conf @@ -60,11 +60,6 @@ # 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. diff --git a/src/auth/auth-settings.c b/src/auth/auth-settings.c index 6be794660d..a3ba8b6385 100644 --- a/src/auth/auth-settings.c +++ b/src/auth/auth-settings.c @@ -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 */ diff --git a/src/auth/auth-settings.h b/src/auth/auth-settings.h index 51d29f9b07..fc4ec7008e 100644 --- a/src/auth/auth-settings.h +++ b/src/auth/auth-settings.h @@ -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; diff --git a/src/config/old-set-parser.c b/src/config/old-set-parser.c index 89c05292f7..5725b75575 100644 --- a/src/config/old-set-parser.c +++ b/src/config/old-set-parser.c @@ -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);