diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-08-10 01:51:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:15:27 -0500 |
commit | ecfdd5fc6cd704eaf496f4d31c18b6db97589fb3 (patch) | |
tree | 8799bc1da6166f243109077391edec29b5386cc3 /source4/lib/ldb/common | |
parent | 11685acd1d79591ed2b9d2656bee5a51442ced0f (diff) | |
download | samba-ecfdd5fc6cd704eaf496f4d31c18b6db97589fb3.tar.gz samba-ecfdd5fc6cd704eaf496f4d31c18b6db97589fb3.tar.bz2 samba-ecfdd5fc6cd704eaf496f4d31c18b6db97589fb3.zip |
r17474: Allow the partitions module to load modules for specific backends.
Andrew Bartlett
(This used to be commit c016db2187120991e8ad779b9df35480d7c19400)
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r-- | source4/lib/ldb/common/ldb_modules.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c index 9eb0a950a4..d38c873c3b 100644 --- a/source4/lib/ldb/common/ldb_modules.c +++ b/source4/lib/ldb/common/ldb_modules.c @@ -73,7 +73,7 @@ static char *talloc_strdup_no_spaces(struct ldb_context *ldb, const char *string /* modules are called in inverse order on the stack. Lets place them as an admin would think the right order is. Modules order is important */ -static const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, const char *string) +const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, const char *string) { char **modules = NULL; const char **m; @@ -95,6 +95,7 @@ static const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC talloc_steal(modules, modstr); i = 0; + /* The str*r*chr walks backwards: This is how we get the inverse order mentioned above */ while ((p = strrchr(modstr, ',')) != NULL) { *p = '\0'; p++; @@ -236,10 +237,10 @@ int ldb_try_load_dso(struct ldb_context *ldb, const char *name) #endif } -static int ldb_load_modules_list(struct ldb_context *ldb, const char **module_list, struct ldb_module *backend, struct ldb_module **out) +int ldb_load_modules_list(struct ldb_context *ldb, const char **module_list, struct ldb_module *backend, struct ldb_module **out) { struct ldb_module *module; - int i, ret; + int i; module = backend; @@ -274,7 +275,7 @@ static int ldb_load_modules_list(struct ldb_context *ldb, const char **module_li return LDB_SUCCESS; } -static int ldb_init_module_chain(struct ldb_context *ldb, struct ldb_module *module) +int ldb_init_module_chain(struct ldb_context *ldb, struct ldb_module *module) { while (module && module->ops->init_context == NULL) module = module->next; |