diff options
Diffstat (limited to 'source4/lib/ldb/tools')
-rw-r--r-- | source4/lib/ldb/tools/cmdline.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbadd.c | 4 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbdel.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbedit.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbmodify.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbrename.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbsearch.c | 4 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbtest.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/tools/oLschema2ldif.c | 2 |
9 files changed, 20 insertions, 2 deletions
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c index a67c41e67f..8f803c5118 100644 --- a/source4/lib/ldb/tools/cmdline.c +++ b/source4/lib/ldb/tools/cmdline.c @@ -71,6 +71,8 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const POPT_TABLEEND }; + ldb_global_init(); + #ifdef _SAMBA_BUILD_ r = ldb_register_samba_handlers(ldb); if (r != 0) { diff --git a/source4/lib/ldb/tools/ldbadd.c b/source4/lib/ldb/tools/ldbadd.c index 0d5acd3787..6a0f510244 100644 --- a/source4/lib/ldb/tools/ldbadd.c +++ b/source4/lib/ldb/tools/ldbadd.c @@ -84,12 +84,14 @@ static int process_file(struct ldb_context *ldb, FILE *f) - int main(int argc, const char **argv) +int main(int argc, const char **argv) { struct ldb_context *ldb; int i, count=0; struct ldb_cmdline *options; + ldb_global_init(); + ldb = ldb_init(NULL); options = ldb_cmdline_process(ldb, argc, argv, usage); diff --git a/source4/lib/ldb/tools/ldbdel.c b/source4/lib/ldb/tools/ldbdel.c index 26544d8a9e..749ce3f91c 100644 --- a/source4/lib/ldb/tools/ldbdel.c +++ b/source4/lib/ldb/tools/ldbdel.c @@ -79,6 +79,8 @@ static void usage(void) int ret, i; struct ldb_cmdline *options; + ldb_global_init(); + ldb = ldb_init(NULL); options = ldb_cmdline_process(ldb, argc, argv, usage); diff --git a/source4/lib/ldb/tools/ldbedit.c b/source4/lib/ldb/tools/ldbedit.c index 9cef81f1db..b4e2b0a848 100644 --- a/source4/lib/ldb/tools/ldbedit.c +++ b/source4/lib/ldb/tools/ldbedit.c @@ -281,6 +281,8 @@ static void usage(void) const char *expression = "(|(objectClass=*)(distinguishedName=*))"; const char * const * attrs = NULL; + ldb_global_init(); + ldb = ldb_init(NULL); options = ldb_cmdline_process(ldb, argc, argv, usage); diff --git a/source4/lib/ldb/tools/ldbmodify.c b/source4/lib/ldb/tools/ldbmodify.c index e785a42a23..4ce49c2ce8 100644 --- a/source4/lib/ldb/tools/ldbmodify.c +++ b/source4/lib/ldb/tools/ldbmodify.c @@ -91,6 +91,8 @@ static int process_file(struct ldb_context *ldb, FILE *f) int i; struct ldb_cmdline *options; + ldb_global_init(); + ldb = ldb_init(NULL); options = ldb_cmdline_process(ldb, argc, argv, usage); diff --git a/source4/lib/ldb/tools/ldbrename.c b/source4/lib/ldb/tools/ldbrename.c index 9c37744277..3229426875 100644 --- a/source4/lib/ldb/tools/ldbrename.c +++ b/source4/lib/ldb/tools/ldbrename.c @@ -58,6 +58,8 @@ static void usage(void) struct ldb_cmdline *options; const struct ldb_dn *dn1, *dn2; + ldb_global_init(); + ldb = ldb_init(NULL); options = ldb_cmdline_process(ldb, argc, argv, usage); diff --git a/source4/lib/ldb/tools/ldbsearch.c b/source4/lib/ldb/tools/ldbsearch.c index c380862c5d..fbf32c0777 100644 --- a/source4/lib/ldb/tools/ldbsearch.c +++ b/source4/lib/ldb/tools/ldbsearch.c @@ -148,7 +148,7 @@ static int do_search(struct ldb_context *ldb, return 0; } - int main(int argc, const char **argv) +int main(int argc, const char **argv) { struct ldb_context *ldb; struct ldb_dn *basedn = NULL; @@ -157,6 +157,8 @@ static int do_search(struct ldb_context *ldb, int ret = -1; const char *expression = "(|(objectClass=*)(distinguishedName=*))"; + ldb_global_init(); + ldb = ldb_init(NULL); options = ldb_cmdline_process(ldb, argc, argv, usage); diff --git a/source4/lib/ldb/tools/ldbtest.c b/source4/lib/ldb/tools/ldbtest.c index 69362d0f20..5fd75a0cab 100644 --- a/source4/lib/ldb/tools/ldbtest.c +++ b/source4/lib/ldb/tools/ldbtest.c @@ -376,6 +376,8 @@ static void usage(void) TALLOC_CTX *mem_ctx = talloc_new(NULL); struct ldb_context *ldb; + ldb_global_init(); + ldb = ldb_init(mem_ctx); options = ldb_cmdline_process(ldb, argc, argv, usage); diff --git a/source4/lib/ldb/tools/oLschema2ldif.c b/source4/lib/ldb/tools/oLschema2ldif.c index b4fe421161..288cf4c3c3 100644 --- a/source4/lib/ldb/tools/oLschema2ldif.c +++ b/source4/lib/ldb/tools/oLschema2ldif.c @@ -583,6 +583,8 @@ static void usage(void) FILE *in = stdin; FILE *out = stdout; + ldb_global_init(); + ctx = talloc_new(NULL); ldb_ctx = ldb_init(ctx); |