summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2002-10-30 12:07:49 +0000
committerJelmer Vernooij <jelmer@samba.org>2002-10-30 12:07:49 +0000
commit04d21551e17a871f3d71d0bc66b9a8d25cecc2fb (patch)
treea82ab9b184e11ab953dec80929fce8509d18714c /source3/lib
parent809f740166e4c71e7b7027c626336d1e4c58f485 (diff)
downloadsamba-04d21551e17a871f3d71d0bc66b9a8d25cecc2fb.tar.gz
samba-04d21551e17a871f3d71d0bc66b9a8d25cecc2fb.tar.bz2
samba-04d21551e17a871f3d71d0bc66b9a8d25cecc2fb.zip
- Remove RTLD_GLOBAL
- make smb_load_module() return the return value of init_module() (This used to be commit a8d2dd8d009797486105188f8fdb898a65bb25b0)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/module.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/lib/module.c b/source3/lib/module.c
index e4d22e0bb7..0953f53ad3 100644
--- a/source3/lib/module.c
+++ b/source3/lib/module.c
@@ -26,12 +26,13 @@ NTSTATUS smb_load_module(const char *module_name)
{
void *handle;
init_module_function *init;
+ NTSTATUS nt_status;
/* Always try to use LAZY symbol resolving; if the plugin has
* backwards compatibility, there might be symbols in the
* plugin referencing to old (removed) functions
*/
- handle = dlopen(module_name, RTLD_LAZY | RTLD_GLOBAL);
+ handle = dlopen(module_name, RTLD_LAZY);
if(!handle) {
DEBUG(0, ("Error loading module '%s': %s\n", module_name, sys_dlerror()));
@@ -45,11 +46,11 @@ NTSTATUS smb_load_module(const char *module_name)
return NT_STATUS_UNSUCCESSFUL;
}
- init();
+ nt_status = init();
DEBUG(2, ("Module '%s' loaded\n", module_name));
- return NT_STATUS_OK;
+ return nt_status;
}
#else /* HAVE_DLOPEN */