1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

s4-ldb: added --relax cmdline option

this adds the relax control
This commit is contained in:
Andrew Tridgell 2010-10-19 11:19:20 +11:00
parent ff456cd100
commit 5f6c004dec

View File

@ -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");