summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-10-19 11:19:20 +1100
committerAndrew Tridgell <tridge@samba.org>2010-10-19 11:22:35 +1100
commit5f6c004dec2140755ddfe5f801775e19a03a7ec8 (patch)
tree075d4504248d0dde07184fcf899c36439b42c9a0
parentff456cd1007dc06a51c5e60394964bcf898b24d2 (diff)
downloadsamba-5f6c004dec2140755ddfe5f801775e19a03a7ec8.tar.gz
samba-5f6c004dec2140755ddfe5f801775e19a03a7ec8.tar.xz
samba-5f6c004dec2140755ddfe5f801775e19a03a7ec8.zip
s4-ldb: added --relax cmdline option
this adds the relax control
-rw-r--r--source4/lib/ldb/tools/cmdline.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c
index 356ce147765..0f60e8f31bd 100644
--- a/source4/lib/ldb/tools/cmdline.c
+++ b/source4/lib/ldb/tools/cmdline.c
@@ -38,6 +38,8 @@
static struct ldb_cmdline options; /* needs to be static for older compilers */
+enum ldb_cmdline_options { CMDLINE_RELAX=1 };
+
static struct poptOption popt_options[] = {
POPT_AUTOHELP
{ "url", 'H', POPT_ARG_STRING, &options.url, 0, "database URL", "URL" },
@@ -62,6 +64,7 @@ static struct poptOption popt_options[] = {
{ "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 },
+ { "relax", 0, POPT_ARG_NONE, NULL, CMDLINE_RELAX, "pass relax control", 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)
@@ -238,6 +241,12 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb,
goto failed;
}
break;
+ case CMDLINE_RELAX:
+ if (!add_control(ret, "relax: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");