From e14c72877fa87e0e6ba0f637dd3367160f8d52b1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 16 Dec 2009 14:58:35 +1100 Subject: s4-ldb: added --show-deactivated-link command line option this adds the SHOW_DEACTIVATED_LINK control --- source4/lib/ldb/tools/cmdline.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source4/lib') diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c index 5204215778..39a460763c 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 }, + { "show-deactivated-link", 0, POPT_ARG_NONE, NULL, 'd', "show deactivated links", 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 }, @@ -221,7 +222,13 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, } break; case 'R': - if (!add_control(ret, "show_recycled:1")) { + if (!add_control(ret, "show_recycled:0")) { + fprintf(stderr, __location__ ": out of memory\n"); + goto failed; + } + break; + case 'd': + if (!add_control(ret, "show_deactivated_link:0")) { fprintf(stderr, __location__ ": out of memory\n"); goto failed; } -- cgit