From 8751ba47a1d1bca1d2e90392ac98a7f562acc4a0 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 7 Sep 2024 21:53:38 +0100 Subject: [PATCH 1/1] Static module inits for raduis and pam --- src/src/drtables.c | 15 +++++++++++++++ src/src/miscmods/radius.c | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/src/drtables.c b/src/src/drtables.c index 32765aedc..b9d4650f1 100644 --- a/src/src/drtables.c +++ b/src/src/drtables.c @@ -738,6 +738,9 @@ DEBUG(D_lookup) debug_printf("Loaded %d lookup modules\n", countmodules); } +/* Add module info struct to the modules list for those that are +built as static */ + #if !defined(DISABLE_DKIM) && (!defined(SUPPORT_DKIM) || SUPPORT_DKIM!=2) extern misc_module_info dkim_module_info; #endif @@ -750,6 +753,12 @@ extern misc_module_info spf_module_info; #if defined(EXPERIMENTAL_ARC) && (!defined(SUPPORT_ARC) || SUPPORT_ARC!=2) extern misc_module_info arc_module_info; #endif +#if defined(RADIUS_CONFIG_FILE) && (!defined(SUPPORT_RADIUS) || SUPPORT_RADUIS!=2) +extern misc_module_info radius_module_info; +#endif +#if defined(SUPPORT_PAM) && SUPPORT_PAM!=2 +extern misc_module_info pam_module_info; +#endif void init_misc_mod_list(void) @@ -771,6 +780,12 @@ onetime = TRUE; #if defined(EXPERIMENTAL_ARC) && (!defined(SUPPORT_ARC) || SUPPORT_ARC!=2) misc_mod_add(&arc_module_info); #endif +#if defined(RADIUS_CONFIG_FILE) && (!defined(SUPPORT_RADIUS) || SUPPORT_RADUIS!=2) + misc_mod_add(&radius_module_info); +#endif +#if defined(SUPPORT_PAM) && SUPPORT_PAM!=2 + misc_mod_add(&pam_module_info); +#endif } diff --git a/src/src/miscmods/radius.c b/src/src/miscmods/radius.c index 61ca6ea3a..6a8d41cac 100644 --- a/src/src/miscmods/radius.c +++ b/src/src/miscmods/radius.c @@ -228,7 +228,7 @@ static void * rad_functions[] = { [RADIUS_AUTH_CALL] = auth_call_radius, }; -misc_module_info rad_module_info = +misc_module_info radius_module_info = { .name = US"radius", # ifdef DYNLOOKUP -- 2.30.2