Remove use of global_loadparm during initialization of gensec.
[sfrench/samba-autobuild/.git] / source4 / torture / rpc / rpc.c
index c0c75ab21abf07df030fae05fd1f214a49b80805..2fcf700c36bdc7b721b2d55d82bb2930198aef87 100644 (file)
@@ -23,9 +23,9 @@
 #include "lib/cmdline/popt_common.h"
 #include "librpc/rpc/dcerpc.h"
 #include "torture/rpc/rpc.h"
-#include "torture/torture.h"
+#include "torture/smbtorture.h"
 #include "librpc/ndr/ndr_table.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 
 static bool torture_rpc_teardown (struct torture_context *tcase, 
                                          void *data)
@@ -33,7 +33,7 @@ static bool torture_rpc_teardown (struct torture_context *tcase,
        struct torture_rpc_tcase_data *tcase_data = 
                (struct torture_rpc_tcase_data *)data;
        if (tcase_data->join_ctx != NULL)
-           torture_leave_domain(tcase_data->join_ctx);
+           torture_leave_domain(tcase, tcase_data->join_ctx);
        talloc_free(tcase_data);
        return true;
 }
@@ -77,13 +77,15 @@ _PUBLIC_ NTSTATUS torture_rpc_connection(struct torture_context *tctx,
        NTSTATUS status;
        struct dcerpc_binding *binding;
 
+       dcerpc_init(tctx->lp_ctx);
+
        status = torture_rpc_binding(tctx, &binding);
        if (NT_STATUS_IS_ERR(status))
                return status;
 
        status = dcerpc_pipe_connect_b(tctx, 
                                     p, binding, table,
-                                    cmdline_credentials, NULL);
+                                    cmdline_credentials, tctx->ev, tctx->lp_ctx);
  
        if (NT_STATUS_IS_ERR(status)) {
                printf("Failed to connect to remote server: %s %s\n", 
@@ -113,7 +115,7 @@ NTSTATUS torture_rpc_connection_transport(struct torture_context *tctx,
        binding->assoc_group_id = assoc_group_id;
 
        status = dcerpc_pipe_connect_b(tctx, p, binding, table,
-                                      cmdline_credentials, NULL);
+                                      cmdline_credentials, tctx->ev, tctx->lp_ctx);
                                           
        if (NT_STATUS_IS_ERR(status)) {
                *p = NULL;
@@ -147,7 +149,7 @@ static bool torture_rpc_setup_machine(struct torture_context *tctx,
                                &(tcase_data->pipe),
                                binding,
                                tcase->table,
-                               tcase_data->credentials, NULL);
+                               tcase_data->credentials, tctx->ev, tctx->lp_ctx);
 
        torture_assert_ntstatus_ok(tctx, status, "Error connecting to server");
 
@@ -205,7 +207,7 @@ static bool torture_rpc_setup_anonymous(struct torture_context *tctx,
                                &(tcase_data->pipe),
                                binding,
                                tcase->table,
-                               tcase_data->credentials, NULL);
+                               tcase_data->credentials, tctx->ev, tctx->lp_ctx);
 
        torture_assert_ntstatus_ok(tctx, status, "Error connecting to server");
 
@@ -371,8 +373,6 @@ NTSTATUS torture_rpc_init(void)
 {
        struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "RPC");
 
-       dcerpc_init();
-
        ndr_table_init();
 
        torture_suite_add_simple_test(suite, "LSA", torture_rpc_lsa);
@@ -387,17 +387,21 @@ NTSTATUS torture_rpc_init(void)
        torture_suite_add_suite(suite, torture_rpc_atsvc(suite));
        torture_suite_add_suite(suite, torture_rpc_wkssvc(suite));
        torture_suite_add_suite(suite, torture_rpc_handles(suite));
+       torture_suite_add_suite(suite, torture_rpc_object_uuid(suite));
        torture_suite_add_suite(suite, torture_rpc_winreg(suite));
        torture_suite_add_simple_test(suite, "SPOOLSS", torture_rpc_spoolss);
        torture_suite_add_suite(suite, torture_rpc_spoolss_notify(suite));
+       torture_suite_add_suite(suite, torture_rpc_spoolss_win(suite));
        torture_suite_add_simple_test(suite, "SAMR", torture_rpc_samr);
        torture_suite_add_simple_test(suite, "SAMR-USERS", torture_rpc_samr_users);
        torture_suite_add_simple_test(suite, "SAMR-PASSWORDS", torture_rpc_samr_passwords);
        torture_suite_add_suite(suite, torture_rpc_netlogon(suite));
+       torture_suite_add_suite(suite, torture_rpc_remote_pac(suite));
        torture_suite_add_simple_test(suite, "SAMLOGON", torture_rpc_samlogon);
        torture_suite_add_simple_test(suite, "SAMSYNC", torture_rpc_samsync);
        torture_suite_add_simple_test(suite, "SCHANNEL", torture_rpc_schannel);
        torture_suite_add_simple_test(suite, "SCHANNEL2", torture_rpc_schannel2);
+       torture_suite_add_simple_test(suite, "BENCH-SCHANNEL1", torture_rpc_schannel_bench1);
        torture_suite_add_suite(suite, torture_rpc_srvsvc(suite));
        torture_suite_add_suite(suite, torture_rpc_svcctl(suite));
        torture_suite_add_suite(suite, torture_rpc_samr_accessmask(suite));