diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-10-19 11:19:20 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-10-19 11:22:35 +1100 |
commit | 5f6c004dec2140755ddfe5f801775e19a03a7ec8 (patch) | |
tree | 075d4504248d0dde07184fcf899c36439b42c9a0 | |
parent | ff456cd1007dc06a51c5e60394964bcf898b24d2 (diff) | |
download | samba-5f6c004dec2140755ddfe5f801775e19a03a7ec8.tar.gz samba-5f6c004dec2140755ddfe5f801775e19a03a7ec8.tar.bz2 samba-5f6c004dec2140755ddfe5f801775e19a03a7ec8.zip |
s4-ldb: added --relax cmdline option
this adds the relax control
-rw-r--r-- | source4/lib/ldb/tools/cmdline.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c index 356ce14776..0f60e8f31b 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"); |