summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-11-06 11:13:37 +1100
committerAndrew Tridgell <tridge@samba.org>2008-11-06 11:13:37 +1100
commit41a1c882d4adec957a1ed180b53fd6874d9524f2 (patch)
treebe5aa92b083d3b70991758d6b7b31b1ab91e3438
parentae795a09796b35c464c2cc89c53776e63e608686 (diff)
downloadsamba-41a1c882d4adec957a1ed180b53fd6874d9524f2.tar.gz
samba-41a1c882d4adec957a1ed180b53fd6874d9524f2.tar.bz2
samba-41a1c882d4adec957a1ed180b53fd6874d9524f2.zip
don't give errors when an empty modules list is given to ldb
-rw-r--r--source4/lib/ldb/common/ldb_modules.c11
-rw-r--r--source4/lib/ldb/include/ldb_private.h3
2 files changed, 9 insertions, 5 deletions
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index 2b453bb0c3..ab0f4c51cc 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -40,6 +40,9 @@
#define LDB_MODULE_PREFIX "modules:"
#define LDB_MODULE_PREFIX_LEN 8
+static void *ldb_dso_load_symbol(struct ldb_context *ldb, const char *name,
+ const char *symbol);
+
void ldb_set_modules_dir(struct ldb_context *ldb, const char *path)
{
talloc_free(ldb->modules_dir);
@@ -291,8 +294,8 @@ int ldb_register_module(const struct ldb_module_ops *ops)
return 0;
}
-void *ldb_dso_load_symbol(struct ldb_context *ldb, const char *name,
- const char *symbol)
+static void *ldb_dso_load_symbol(struct ldb_context *ldb, const char *name,
+ const char *symbol)
{
char *path;
void *handle;
@@ -334,6 +337,10 @@ int ldb_load_modules_list(struct ldb_context *ldb, const char **module_list, str
for (i = 0; module_list[i] != NULL; i++) {
struct ldb_module *current;
const struct ldb_module_ops *ops;
+
+ if (strcmp(module_list[i], "") == 0) {
+ continue;
+ }
ops = ldb_find_module_ops(module_list[i]);
if (ops == NULL) {
diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h
index 8f7e010bee..90c4980017 100644
--- a/source4/lib/ldb/include/ldb_private.h
+++ b/source4/lib/ldb/include/ldb_private.h
@@ -259,9 +259,6 @@ const char *ldb_default_modules_dir(void);
int ldb_register_backend(const char *url_prefix, ldb_connect_fn);
-void *ldb_dso_load_symbol(struct ldb_context *ldb, const char *name,
- const char *symbol);
-
struct ldb_handle *ldb_handle_new(TALLOC_CTX *mem_ctx, struct ldb_context *ldb);
int ldb_module_send_entry(struct ldb_request *req,