diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2003-05-15 08:47:28 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2003-05-15 08:47:28 +0000 |
commit | 6203409d2ef442fd7d620ddaa8ea85cc7b6695fd (patch) | |
tree | e80c07f4c77400db16677923cc2a4886c937eac5 /source3/auth/auth.c | |
parent | c05858c89382df5ff161068b3e13be20178bec84 (diff) | |
download | samba-6203409d2ef442fd7d620ddaa8ea85cc7b6695fd.tar.gz samba-6203409d2ef442fd7d620ddaa8ea85cc7b6695fd.tar.xz samba-6203409d2ef442fd7d620ddaa8ea85cc7b6695fd.zip |
Patch from Luke Howard <lukeh@PADL.COM> that fixes some weird handling of
modules in auth/
(This used to be commit 4b6785a6c0fe0aebb1cc69bfc9937d19bc692642)
Diffstat (limited to 'source3/auth/auth.c')
-rw-r--r-- | source3/auth/auth.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c index cec15da1f66..0c4fe768307 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -372,17 +372,25 @@ BOOL load_auth_module(struct auth_context *auth_context, entry = auth_find_backend_entry(module_name); - if(!(entry = auth_find_backend_entry(module_name)) && NT_STATUS_IS_ERR(smb_probe_module("auth", module_name)) && - !(entry = auth_find_backend_entry(module_name))) { - DEBUG(0,("load_auth_module: can't find auth method %s!\n", module_name)); - } else if (!NT_STATUS_IS_OK(entry->init(auth_context, module_params, ret))) { - DEBUG(0,("load_auth_module: auth method %s did not correctly init\n", - module)); + if (entry == NULL) { + if (NT_STATUS_IS_OK(smb_probe_module("auth", module_name))) { + entry = auth_find_backend_entry(module_name); + } + } + + if (entry != NULL) { + if (!NT_STATUS_IS_OK(entry->init(auth_context, module_params, ret))) { + DEBUG(0,("load_auth_module: auth method %s did not correctly init\n", + module_name)); + } else { + DEBUG(5,("load_auth_module: auth method %s has a valid init\n", + module_name)); + good = True; + } } else { - DEBUG(5,("load_auth_module: auth method %s has a valid init\n", - module)); - good = True; + DEBUG(0,("load_auth_module: can't find auth method %s!\n", module_name)); } + SAFE_FREE(module_name); return good; } |