diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-05-06 09:55:05 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:51:46 -0500 |
commit | 68293565de0b799dcc51e001dabf53adf88ee7ad (patch) | |
tree | cc8710f307f2f4ed31bd5d4fdd1e17433fc692a5 /source4/lib/ldb/tools | |
parent | 404c319a5013132edf402e18da0144d7566d2623 (diff) | |
download | samba-68293565de0b799dcc51e001dabf53adf88ee7ad.tar.gz samba-68293565de0b799dcc51e001dabf53adf88ee7ad.tar.bz2 samba-68293565de0b799dcc51e001dabf53adf88ee7ad.zip |
r513: added a generic ldb debug system to allow the Samba debug functions to
be cleanly interfaced to ldb
(This used to be commit 74b89d5f960d6b936751e3f057b4540eb80b79cd)
Diffstat (limited to 'source4/lib/ldb/tools')
-rw-r--r-- | source4/lib/ldb/tools/ldbadd.c | 2 | ||||
-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/ldbsearch.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/tools/ldbtest.c | 2 |
6 files changed, 12 insertions, 0 deletions
diff --git a/source4/lib/ldb/tools/ldbadd.c b/source4/lib/ldb/tools/ldbadd.c index 6d89f67e0f..a45021c1d9 100644 --- a/source4/lib/ldb/tools/ldbadd.c +++ b/source4/lib/ldb/tools/ldbadd.c @@ -115,6 +115,8 @@ static int process_file(struct ldb_context *ldb, FILE *f) exit(1); } + ldb_set_debug_stderr(ldb); + if (argc == 0) { usage(); } diff --git a/source4/lib/ldb/tools/ldbdel.c b/source4/lib/ldb/tools/ldbdel.c index 48ee07ad25..880713b25a 100644 --- a/source4/lib/ldb/tools/ldbdel.c +++ b/source4/lib/ldb/tools/ldbdel.c @@ -85,6 +85,8 @@ static void usage(void) exit(1); } + ldb_set_debug_stderr(ldb); + for (i=0;i<argc;i++) { ret = ldb_delete(ldb, argv[i]); if (ret != 0) { diff --git a/source4/lib/ldb/tools/ldbedit.c b/source4/lib/ldb/tools/ldbedit.c index 57c54cad40..739c3b6301 100644 --- a/source4/lib/ldb/tools/ldbedit.c +++ b/source4/lib/ldb/tools/ldbedit.c @@ -351,6 +351,8 @@ static void usage(void) exit(1); } + ldb_set_debug_stderr(ldb); + ret = ldb_search(ldb, basedn, scope, expression, NULL, &msgs); if (ret == -1) { diff --git a/source4/lib/ldb/tools/ldbmodify.c b/source4/lib/ldb/tools/ldbmodify.c index 6ac8e366c7..9f7cbe4527 100644 --- a/source4/lib/ldb/tools/ldbmodify.c +++ b/source4/lib/ldb/tools/ldbmodify.c @@ -117,6 +117,8 @@ static int process_file(struct ldb_context *ldb, FILE *f) exit(1); } + ldb_set_debug_stderr(ldb); + if (argc == 0) { usage(); exit(1); diff --git a/source4/lib/ldb/tools/ldbsearch.c b/source4/lib/ldb/tools/ldbsearch.c index edda31b793..f80f81b50e 100644 --- a/source4/lib/ldb/tools/ldbsearch.c +++ b/source4/lib/ldb/tools/ldbsearch.c @@ -149,6 +149,8 @@ static int do_search(struct ldb_context *ldb, exit(1); } + ldb_set_debug_stderr(ldb); + if (interactive) { char line[1024]; while (fgets(line, sizeof(line), stdin)) { diff --git a/source4/lib/ldb/tools/ldbtest.c b/source4/lib/ldb/tools/ldbtest.c index e7db767387..fc224115f5 100644 --- a/source4/lib/ldb/tools/ldbtest.c +++ b/source4/lib/ldb/tools/ldbtest.c @@ -319,6 +319,8 @@ static void usage(void) exit(1); } + ldb_set_debug_stderr(ldb); + srandom(1); start_test(ldb, nrecords, nsearches); |