From: Timo Sirainen Date: Tue, 26 Nov 2024 14:01:20 +0000 (+0200) Subject: auth: Remove legacy userdb init and userdb_args setting X-Git-Tag: 2.4.0~91 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f55482bf1a7603691a4a022d0e93e70e2791808d;p=thirdparty%2Fdovecot%2Fcore.git auth: Remove legacy userdb init and userdb_args setting --- diff --git a/src/auth/auth-settings.c b/src/auth/auth-settings.c index 5b373bf753..2ea0cfac1f 100644 --- a/src/auth/auth-settings.c +++ b/src/auth/auth-settings.c @@ -185,7 +185,6 @@ const struct setting_parser_info auth_passdb_post_setting_parser_info = { static const struct setting_define auth_userdb_setting_defines[] = { DEF(STR, name), DEF(STR, driver), - DEF(STR_NOVARS, args), DEF(BOOL, fields_import_all), DEF(ENUM, skip), @@ -203,7 +202,6 @@ static const struct auth_userdb_settings auth_userdb_default_settings = { /* NOTE: when adding fields, update also auth.c:userdb_dummy_set */ .name = "", .driver = "", - .args = "", .fields_import_all = TRUE, .skip = "never:found:notfound", diff --git a/src/auth/auth-settings.h b/src/auth/auth-settings.h index a49921484b..1d420eceaa 100644 --- a/src/auth/auth-settings.h +++ b/src/auth/auth-settings.h @@ -38,7 +38,6 @@ struct auth_userdb_settings { pool_t pool; const char *name; const char *driver; - const char *args; bool fields_import_all; const char *skip; diff --git a/src/auth/auth.c b/src/auth/auth.c index a733e7ba07..a596f0e6d0 100644 --- a/src/auth/auth.c +++ b/src/auth/auth.c @@ -24,7 +24,6 @@ struct event_category event_category_auth = { static const struct auth_userdb_settings userdb_dummy_set = { .name = "", .driver = "static", - .args = "", .skip = "never", .result_success = "return-ok", diff --git a/src/auth/userdb.c b/src/auth/userdb.c index dadaeb2002..1606c3211e 100644 --- a/src/auth/userdb.c +++ b/src/auth/userdb.c @@ -119,27 +119,16 @@ userdb_preinit(pool_t pool, struct event *event, i_fatal("Support not compiled in for userdb driver '%s'", set->driver); } - if (iface->preinit_legacy == NULL && iface->init == NULL && - *set->args != '\0') { - i_fatal("userdb %s: No args are supported: %s", - set->driver, set->args); - } if (iface->preinit != NULL) { - if (set->args[0] != '\0') - i_fatal("userdb %s: userdb_args must be empty", set->name); if (iface->preinit(pool, event, &userdb, &error) < 0) i_fatal("userdb %s: %s", set->name, error); userdb->blocking = set->use_worker; } else { - if (iface->preinit_legacy == NULL) - userdb = p_new(pool, struct userdb_module, 1); - else - userdb = iface->preinit_legacy(pool, set->args); + userdb = p_new(pool, struct userdb_module, 1); } userdb->id = ++auth_userdb_id; userdb->iface = iface; - userdb->args = p_strdup(pool, set->args); array_push_back(&userdb_modules, &userdb); return userdb; } diff --git a/src/auth/userdb.h b/src/auth/userdb.h index 961f4d766c..6fa52efe42 100644 --- a/src/auth/userdb.h +++ b/src/auth/userdb.h @@ -21,7 +21,6 @@ typedef void userdb_callback_t(enum userdb_result result, typedef void userdb_iter_callback_t(const char *user, void *context); struct userdb_module { - const char *args; /* The default caching key for this module, or NULL if caching isn't wanted. This is updated by settings in auth_userdb. */ const char *default_cache_key; @@ -52,7 +51,6 @@ struct userdb_module_interface { given event. */ int (*preinit)(pool_t pool, struct event *event, struct userdb_module **module_r, const char **error_r); - struct userdb_module *(*preinit_legacy)(pool_t pool, const char *args); void (*init)(struct userdb_module *module); void (*deinit)(struct userdb_module *module);