From d550fc8fa3b8a081ea395878bae1e88ea148612f Mon Sep 17 00:00:00 2001 From: Markus Valentin Date: Tue, 12 Mar 2024 07:43:33 +0100 Subject: [PATCH] auth: auths_preinit() - Add event parameter --- src/auth/auth.c | 5 +++-- src/auth/auth.h | 3 ++- src/auth/main.c | 2 +- src/auth/test-auth.c | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) 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(); -- 2.47.3