summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-06-20 14:30:02 +0200
committerKarolin Seeger <kseeger@samba.org>2008-06-23 09:20:42 +0200
commit78e7005c87603625e7d02b83af4a790277737806 (patch)
tree54780ef71c53196511abcd4271412f636018dfef
parent5b439ea7cf94fdce24eaae62c2a772361ad5b422 (diff)
downloadsamba-78e7005c87603625e7d02b83af4a790277737806.tar.gz
Use "init_shared_module" instead of "init_module" for initializing .so's
(cherry picked from commit eabea09243d164c03b9fdfc0d569054c03e67edf)
-rw-r--r--source/lib/ldb/common/ldb_modules.c6
-rw-r--r--source/lib/module.c6
-rw-r--r--source/m4/aclocal.m42
3 files changed, 8 insertions, 6 deletions
diff --git a/source/lib/ldb/common/ldb_modules.c b/source/lib/ldb/common/ldb_modules.c
index d898f3df03e..71a02205019 100644
--- a/source/lib/ldb/common/ldb_modules.c
+++ b/source/lib/ldb/common/ldb_modules.c
@@ -231,10 +231,12 @@ int ldb_try_load_dso(struct ldb_context *ldb, const char *name)
return -1;
}
- init_fn = (int (*)(void))dlsym(handle, "init_module");
+ init_fn = (int (*)(void))dlsym(handle, "init_shared_module");
if (init_fn == NULL) {
- ldb_debug(ldb, LDB_DEBUG_ERROR, "no symbol `init_module' found in %s: %s\n", path, dlerror());
+ ldb_debug(ldb, LDB_DEBUG_ERROR, "no symbol "
+ "`init_shared_module' found in %s: %s\n", path,
+ dlerror());
dlclose(handle);
return -1;
}
diff --git a/source/lib/module.c b/source/lib/module.c
index 285bd9c4c07..dee0623094e 100644
--- a/source/lib/module.c
+++ b/source/lib/module.c
@@ -49,14 +49,14 @@ static NTSTATUS do_smb_load_module(const char *module_name, bool is_probe)
return NT_STATUS_UNSUCCESSFUL;
}
- init = (init_module_function *)sys_dlsym(handle, "init_module");
+ init = (init_module_function *)sys_dlsym(handle, "init_shared_module");
/* we must check sys_dlerror() to determine if it worked, because
sys_dlsym() can validly return NULL */
error = sys_dlerror();
if (error) {
- DEBUG(0, ("Error trying to resolve symbol 'init_module' in %s: %s\n",
- module_name, error));
+ DEBUG(0, ("Error trying to resolve symbol 'init_shared_module' "
+ "in %s: %s\n", module_name, error));
sys_dlclose(handle);
return NT_STATUS_UNSUCCESSFUL;
}
diff --git a/source/m4/aclocal.m4 b/source/m4/aclocal.m4
index 48cdacc9c8a..71b3b696567 100644
--- a/source/m4/aclocal.m4
+++ b/source/m4/aclocal.m4
@@ -25,7 +25,7 @@ AC_DEFUN(SMB_MODULE,
fi
if test x"$DEST" = xSHARED; then
- AC_DEFINE([$1][_init], [init_module], [Whether to build $1 as shared module])
+ AC_DEFINE([$1][_init], [init_shared_module], [Whether to build $1 as shared module])
$4_MODULES="$$4_MODULES $3"
AC_MSG_RESULT([shared])
[$6]