summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-21 15:24:39 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-21 15:27:05 -0700
commitb23294e4071543db4628253222c893931a16b91c (patch)
treed9ca0930bda14796dea6564f489785f8d53a5715 /source4/lib
parent97ffb912c164e94728e5d3f82d602bb086bf65a4 (diff)
downloadsamba-b23294e4071543db4628253222c893931a16b91c.tar.gz
samba-b23294e4071543db4628253222c893931a16b91c.tar.bz2
samba-b23294e4071543db4628253222c893931a16b91c.zip
s4-ldb: add --trace command line option to ldb tools
This enabled LDB_FLG_ENABLE_TRACING
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/tools/cmdline.c5
-rw-r--r--source4/lib/ldb/tools/cmdline.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c
index 8541106060..73bf2a93a7 100644
--- a/source4/lib/ldb/tools/cmdline.c
+++ b/source4/lib/ldb/tools/cmdline.c
@@ -44,6 +44,7 @@ static struct poptOption popt_options[] = {
{ "editor", 'e', POPT_ARG_STRING, &options.editor, 0, "external editor", "PROGRAM" },
{ "scope", 's', POPT_ARG_STRING, NULL, 's', "search scope", "SCOPE" },
{ "verbose", 'v', POPT_ARG_NONE, NULL, 'v', "increase verbosity", NULL },
+ { "trace", 0, POPT_ARG_NONE, &options.tracing, 0, "enable tracing", 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" },
@@ -220,6 +221,10 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb,
flags |= LDB_FLG_SHOW_BINARY;
}
+ if (options.tracing) {
+ flags |= LDB_FLG_ENABLE_TRACING;
+ }
+
#if (_SAMBA_BUILD_ >= 4)
/* Must be after we have processed command line options */
gensec_init(cmdline_lp_ctx);
diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h
index 9f728fba0b..28061a5a7d 100644
--- a/source4/lib/ldb/tools/cmdline.h
+++ b/source4/lib/ldb/tools/cmdline.h
@@ -45,6 +45,7 @@ struct ldb_cmdline {
const char *output;
char **controls;
int show_binary;
+ int tracing;
};
struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const char **argv,