summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-16 14:58:35 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-16 20:56:23 +1100
commite14c72877fa87e0e6ba0f637dd3367160f8d52b1 (patch)
treec344599fdaf734dfc5f1f6a2166dd39aae7dc486
parentf9302f9e08d68f6fd974e02668c2bae273981688 (diff)
downloadsamba-e14c72877fa87e0e6ba0f637dd3367160f8d52b1.tar.gz
samba-e14c72877fa87e0e6ba0f637dd3367160f8d52b1.tar.bz2
samba-e14c72877fa87e0e6ba0f637dd3367160f8d52b1.zip
s4-ldb: added --show-deactivated-link command line option
this adds the SHOW_DEACTIVATED_LINK control
-rw-r--r--source4/lib/ldb/tools/cmdline.c9
1 files changed, 8 insertions, 1 deletions
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;
}