Fix problems with event context not being the parent.
[gd/samba-autobuild/.git] / source4 / torture / smbtorture.c
index 371ddc729771d9e884de7a8666c0bf6cb0cb98b7..faae784e4b09db4418f01e16b080670e168f66df 100644 (file)
@@ -36,6 +36,8 @@
 #include "librpc/rpc/dcerpc.h"
 #include "param/param.h"
 
+#include "auth/credentials/credentials.h"
+
 static bool run_matching(struct torture_context *torture,
                                                 const char *prefix, 
                                                 const char *expr,
@@ -615,8 +617,6 @@ int main(int argc,char *argv[])
                alarm(max_runtime);
        }
 
-       ldb_global_init();
-
        if (extra_module != NULL) {
            init_module_fn fn = load_module(talloc_autofree_context(), poptGetOptArg(pc));
 
@@ -675,7 +675,7 @@ int main(int argc,char *argv[])
                exit(1);
        }
 
-       torture = torture_context_init(talloc_autofree_context(), ui_ops);
+       torture = torture_context_init(cli_credentials_get_event_context(cmdline_credentials), ui_ops);
        if (basedir != NULL) {
                if (basedir[0] != '/') {
                        fprintf(stderr, "Please specify an absolute path to --basedir\n");