From 310875e637fd237752770027b28675ed970352dd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 17 Jun 2008 13:11:29 +1000 Subject: Change our module code to not use the special symbol name init_module() Current glibc libraries include a function called init_module(). If we use the same name, then a dlsym() can find the glibc function if the module doesn't have an initialisation function. In ldb, none of our modules have an init_module(), so we end up calling the libc functions with bogus arguments. (This used to be commit 1b0621068998590e7b1e9528b78744dcd2cd5909) --- source4/lib/ldb/common/ldb.c | 10 ---------- source4/lib/ldb/common/ldb_modules.c | 10 ---------- 2 files changed, 20 deletions(-) (limited to 'source4/lib/ldb/common') diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index d0570c5382..cac0a383d8 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -184,16 +184,6 @@ int ldb_connect_backend(struct ldb_context *ldb, fn = ldb_find_backend(backend); - if (fn == NULL) { - int (*init_fn) (void); - - init_fn = ldb_dso_load_symbol(ldb, backend, - "init_module"); - if (init_fn != NULL && init_fn() == 0) { - fn = ldb_find_backend(backend); - } - } - if (fn == NULL) { struct ldb_backend_ops *ops; char *symbol_name = talloc_asprintf(ldb, "ldb_%s_backend_ops", backend); diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c index ddbe0f23a6..fbfb5e5322 100644 --- a/source4/lib/ldb/common/ldb_modules.c +++ b/source4/lib/ldb/common/ldb_modules.c @@ -223,16 +223,6 @@ int ldb_load_modules_list(struct ldb_context *ldb, const char **module_list, str const struct ldb_module_ops *ops; ops = ldb_find_module_ops(module_list[i]); - if (ops == NULL) { - int (*init_fn) (void); - - init_fn = ldb_dso_load_symbol(ldb, module_list[i], - "init_module"); - if (init_fn != NULL && init_fn() == 0) { - ops = ldb_find_module_ops(module_list[i]); - } - } - if (ops == NULL) { char *symbol_name = talloc_asprintf(ldb, "ldb_%s_module_ops", module_list[i]); -- cgit