{ "editor", 'e', POPT_ARG_STRING, &options.editor, 0, "external editor", "PROGRAM" },
{ "scope", 's', POPT_ARG_STRING, NULL, 's', "search scope", "SCOPE" },
{ "verbose", 'v', POPT_ARG_NONE, NULL, 'v', "increase verbosity", NULL },
+ { "trace", 0, POPT_ARG_NONE, &options.tracing, 0, "enable tracing", NULL },
{ "interactive", 'i', POPT_ARG_NONE, &options.interactive, 0, "input from stdin", NULL },
{ "recursive", 'r', POPT_ARG_NONE, &options.recursive, 0, "recursive delete", NULL },
{ "modules-path", 0, POPT_ARG_STRING, &options.modules_path, 0, "modules path", "PATH" },
{ "output", 'O', POPT_ARG_STRING, &options.output, 0, "Output File", "Output" },
{ NULL, 'o', POPT_ARG_STRING, NULL, 'o', "ldb_connect option", "OPTION" },
{ "controls", 0, POPT_ARG_STRING, NULL, 'c', "controls", NULL },
+ { "show-binary", 0, POPT_ARG_NONE, &options.show_binary, 0, "display binary LDIF", NULL },
#if (_SAMBA_BUILD_ >= 4)
POPT_COMMON_SAMBA
POPT_COMMON_CREDENTIALS
#endif
+ /* make the ldb utilities line buffered */
+ setlinebuf(stdout);
+
ret = talloc_zero(ldb, struct ldb_cmdline);
if (ret == NULL) {
fprintf(stderr, "Out of memory!\n");
flags |= LDB_FLG_NOSYNC;
}
+ if (options.show_binary) {
+ flags |= LDB_FLG_SHOW_BINARY;
+ }
+
+ if (options.tracing) {
+ flags |= LDB_FLG_ENABLE_TRACING;
+ }
+
#if (_SAMBA_BUILD_ >= 4)
/* Must be after we have processed command line options */
gensec_init(cmdline_lp_ctx);
- if (ldb_set_opaque(ldb, "sessionInfo", system_session(ldb, cmdline_lp_ctx))) {
+ if (ldb_set_opaque(ldb, "sessionInfo", system_session(cmdline_lp_ctx))) {
goto failed;
}
if (ldb_set_opaque(ldb, "credentials", cmdline_credentials)) {