From: Markus Valentin Date: Tue, 12 Mar 2024 06:43:33 +0000 (+0100) Subject: auth: auths_preinit() - Add event parameter X-Git-Tag: 2.4.1~925 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e24818c6459be276c6d59d4c8980abd3cbe3e53;p=thirdparty%2Fdovecot%2Fcore.git auth: auths_preinit() - Add event parameter --- diff --git a/src/auth/auth.c b/src/auth/auth.c index 9df0a7e04e..26a50d2043 100644 --- a/src/auth/auth.c +++ b/src/auth/auth.c @@ -450,7 +450,8 @@ struct auth *auth_default_protocol(void) return a[0]; } -void auths_preinit(const struct auth_settings *set, +void auths_preinit(struct event *parent_event, + const struct auth_settings *set, const struct mechanisms_register *reg, const char *const *protocols) { @@ -460,7 +461,7 @@ void auths_preinit(const struct auth_settings *set, const char *not_protocol = NULL; bool check_default = TRUE; - auth_event = event_create(NULL); + auth_event = event_create(parent_event); event_set_forced_debug(auth_event, set->debug); event_add_category(auth_event, &event_category_auth); i_array_init(&auths, 8); diff --git a/src/auth/auth.h b/src/auth/auth.h index 7e59e5d8fc..2e1440f156 100644 --- a/src/auth/auth.h +++ b/src/auth/auth.h @@ -85,7 +85,8 @@ struct auth { struct auth *auth_find_protocol(const char *name); struct auth *auth_default_protocol(void); -void auths_preinit(const struct auth_settings *set, +void auths_preinit(struct event *parent_event, + const struct auth_settings *set, const struct mechanisms_register *reg, const char *const *protocols); void auths_init(void); diff --git a/src/auth/main.c b/src/auth/main.c index b45bb16253..949e5fa88d 100644 --- a/src/auth/main.c +++ b/src/auth/main.c @@ -178,7 +178,7 @@ static void main_preinit(void) mech_init(global_auth_settings); mech_reg = mech_register_init(global_auth_settings); dict_drivers_register_builtin(); - auths_preinit(global_auth_settings, mech_reg, protocols); + auths_preinit(NULL, global_auth_settings, mech_reg, protocols); listeners_init(); if (!worker) diff --git a/src/auth/test-auth.c b/src/auth/test-auth.c index 389d87def9..9025f1ea33 100644 --- a/src/auth/test-auth.c +++ b/src/auth/test-auth.c @@ -72,7 +72,7 @@ void test_auth_init(void) password_schemes_init(); password_schemes_allow_weak(TRUE); - auths_preinit(&test_auth_set, mech_reg, protocols); + auths_preinit(NULL, &test_auth_set, mech_reg, protocols); auths_init(); auth_token_init();