From f017f871078fd2219766ea061468268acb92140c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 5 Nov 2007 21:57:33 +0100 Subject: r25842: Start working on test for loading dso's in ldb. (This used to be commit d41ed7ca8d3954bf586126edd7aba17acc6af8a1) --- source4/lib/ldb/tools/cmdline.c | 7 +++++++ source4/lib/ldb/tools/cmdline.h | 1 + 2 files changed, 8 insertions(+) (limited to 'source4/lib/ldb/tools') diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c index 2cf8212154..a713f54e68 100644 --- a/source4/lib/ldb/tools/cmdline.c +++ b/source4/lib/ldb/tools/cmdline.c @@ -60,6 +60,7 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const { "verbose", 'v', POPT_ARG_NONE, NULL, 'v', "increase verbosity", NULL }, { "interactive", 'i', POPT_ARG_NONE, &options.interactive, 0, "input from stdin", NULL }, { "recursive", 'r', POPT_ARG_NONE, &options.recursive, 0, "recursive delete", NULL }, + { "modules-path", 0, POPT_ARG_STRING, &options.modules_path, 0, "modules path", "PATH" }, { "num-searches", 0, POPT_ARG_INT, &options.num_searches, 0, "number of test searches", NULL }, { "num-records", 0, POPT_ARG_INT, &options.num_records, 0, "number of test records", NULL }, { "all", 'a', POPT_ARG_NONE, &options.all_records, 0, "(|(objectClass=*)(distinguishedName=*))", NULL }, @@ -218,6 +219,12 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const ldb_set_utf8_fns(ldb, NULL, wrap_casefold); #endif + if (options.modules_path != NULL) { + ldb_set_modules_dir(ldb, options.modules_path); + } else if (getenv("LDB_MODULES_PATH") != NULL) { + ldb_set_modules_dir(ldb, getenv("LDB_MODULES_PATH")); + } + /* now connect to the ldb */ if (ldb_connect(ldb, ret->url, flags, ret->options) != 0) { fprintf(stderr, "Failed to connect to %s - %s\n", diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h index ae295d68a4..3473d62a16 100644 --- a/source4/lib/ldb/tools/cmdline.h +++ b/source4/lib/ldb/tools/cmdline.h @@ -27,6 +27,7 @@ struct ldb_cmdline { const char *url; enum ldb_scope scope; const char *basedn; + const char *modules_path; int interactive; int sorted; const char *editor; -- cgit