From 725e25a20604c7032a14bcc8e3c33625e802757a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Dec 2009 23:44:05 +1100 Subject: s4-ldb: added a new "reveal" control This control will allow inspection of internal ldb values, which would normally be stripped before being presented to users. The first use will be stripping linked attribute meta data extended components. --- source4/lib/ldb/tools/cmdline.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/lib/ldb/tools') diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c index e27ca5b6a6..5204215778 100644 --- a/source4/lib/ldb/tools/cmdline.c +++ b/source4/lib/ldb/tools/cmdline.c @@ -61,6 +61,7 @@ static struct poptOption popt_options[] = { { "paged", 0, POPT_ARG_NONE, NULL, 'P', "use a paged search", NULL }, { "show-deleted", 0, POPT_ARG_NONE, NULL, 'D', "show deleted objects", NULL }, { "show-recycled", 0, POPT_ARG_NONE, NULL, 'R', "show recycled objects", NULL }, + { "reveal", 0, POPT_ARG_NONE, NULL, 'r', "reveal ldb internals", NULL }, { "cross-ncs", 0, POPT_ARG_NONE, NULL, 'N', "search across NC boundaries", NULL }, { "extended-dn", 0, POPT_ARG_NONE, NULL, 'E', "show extended DNs", NULL }, #if (_SAMBA_BUILD_ >= 4) @@ -225,6 +226,12 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, goto failed; } break; + case 'r': + if (!add_control(ret, "reveal_internals:0")) { + fprintf(stderr, __location__ ": out of memory\n"); + goto failed; + } + break; case 'N': if (!add_control(ret, "search_options:1:2")) { fprintf(stderr, __location__ ": out of memory\n"); -- cgit