From: Volker Lendecke Date: Wed, 1 Jul 2026 15:08:05 +0000 (+0200) Subject: auth3: A bit README.Coding in load_auth_module() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adfbc496a9f83e7ca85c739b79289b8d8c11dc5c;p=thirdparty%2Fsamba.git auth3: A bit README.Coding in load_auth_module() Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/auth/auth.c b/source3/auth/auth.c index 7d51731d96c..214fd0f45e7 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -421,11 +421,11 @@ static bool load_auth_module( { static bool initialised_static_modules = False; - struct auth_init_function_entry *entry; + struct auth_init_function_entry *entry = NULL; char module_name[strlen(module) + 1]; char *module_params = NULL; - char *p; - bool good = False; + char *p = NULL; + NTSTATUS status; /* Initialise static modules if not done so yet */ if(!initialised_static_modules) { @@ -459,15 +459,16 @@ static bool load_auth_module( return false; } - if (!NT_STATUS_IS_OK(entry->init(auth_context, module_params, ret))) { - DBG_ERR("auth method %s did not correctly init\n", - module_name); - } else { - DBG_INFO("auth method %s has a valid init\n", module_name); - good = True; + status = entry->init(auth_context, module_params, ret); + if (!NT_STATUS_IS_OK(status)) { + DBG_ERR("auth method %s did not correctly init %s\n", + module_name, + nt_errstr(status)); + return false; } - return good; + DBG_INFO("auth method %s has a valid init\n", module_name); + return true; } /***************************************************************************