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 | |
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')
-rw-r--r-- | source4/lib/ldb/common/ldb_modules.c | 9 | ||||
-rw-r--r-- | source4/lib/ldb/include/ldb_private.h | 3 |
2 files changed, 8 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; diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h index f442202ee3..97e2828371 100644 --- a/source4/lib/ldb/include/ldb_private.h +++ b/source4/lib/ldb/include/ldb_private.h @@ -137,7 +137,10 @@ int ldb_connect_backend(struct ldb_context *ldb, const char *url, const char *op /* The following definitions come from lib/ldb/common/ldb_modules.c */ +const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, const char *string); +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(struct ldb_context *ldb, const char *options[]); +int ldb_init_module_chain(struct ldb_context *ldb, struct ldb_module *module); int ldb_next_request(struct ldb_module *module, struct ldb_request *request); int ldb_next_start_trans(struct ldb_module *module); int ldb_next_end_trans(struct ldb_module *module); |