PATCH: make auth plugins work again
Luke Howard
lukeh at PADL.COM
Thu May 15 04:18:02 GMT 2003
This patch is against alpha24 and fixes the confusing logic in auth.c
that was breaking authentication plugins (exactly how I'm not sure,
I couldn't really follow the logic :-))
-- Luke
-------------- next part --------------
Index: auth/auth.c
===================================================================
RCS file: /home/project/cvs/samba/source/auth/auth.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 auth.c
--- auth/auth.c 2003/05/15 02:09:16 1.1.1.2
+++ auth/auth.c 2003/05/15 04:15:56
@@ -372,17 +372,25 @@
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));
+ } else {
+ DEBUG(5,("load_auth_module: auth method %s has a valid init\n",
+ module));
+ 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;
}
-------------- next part --------------
--
Luke Howard | PADL Software Pty Ltd | www.padl.com
More information about the samba-technical
mailing list