diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-08-28 12:54:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:03:00 -0500 |
commit | 919aa6b27e5fe49b70c814210aa026c19be66e8a (patch) | |
tree | 4f1cff79459133a014a32e3f42fa787c7d83de67 /source4/torture/rpc/rpc.c | |
parent | b42691ee167415c7dc89d50b4ba18909bacd40c1 (diff) | |
download | samba-919aa6b27e5fe49b70c814210aa026c19be66e8a.tar.gz samba-919aa6b27e5fe49b70c814210aa026c19be66e8a.tar.bz2 samba-919aa6b27e5fe49b70c814210aa026c19be66e8a.zip |
r24735: Use torture API in more places.
(This used to be commit 1319d88c099496be29dd9214fa2492c81e848369)
Diffstat (limited to 'source4/torture/rpc/rpc.c')
-rw-r--r-- | source4/torture/rpc/rpc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source4/torture/rpc/rpc.c b/source4/torture/rpc/rpc.c index 12ace3e7d2..96e70cfe11 100644 --- a/source4/torture/rpc/rpc.c +++ b/source4/torture/rpc/rpc.c @@ -28,19 +28,19 @@ #include "lib/util/dlinklist.h" /* open a rpc connection to the chosen binding string */ -_PUBLIC_ NTSTATUS torture_rpc_connection(TALLOC_CTX *parent_ctx, +_PUBLIC_ NTSTATUS torture_rpc_connection(struct torture_context *tctx, struct dcerpc_pipe **p, const struct ndr_interface_table *table) { - NTSTATUS status; - const char *binding = lp_parm_string(-1, "torture", "binding"); + NTSTATUS status; + const char *binding = torture_setting_string(tctx, "binding", NULL); if (!binding) { printf("You must specify a ncacn binding string\n"); return NT_STATUS_INVALID_PARAMETER; } - status = dcerpc_pipe_connect(parent_ctx, + status = dcerpc_pipe_connect(tctx, p, binding, table, cmdline_credentials, NULL); @@ -52,16 +52,16 @@ _PUBLIC_ NTSTATUS torture_rpc_connection(TALLOC_CTX *parent_ctx, } /* open a rpc connection to a specific transport */ -NTSTATUS torture_rpc_connection_transport(TALLOC_CTX *parent_ctx, +NTSTATUS torture_rpc_connection_transport(struct torture_context *tctx, struct dcerpc_pipe **p, const struct ndr_interface_table *table, enum dcerpc_transport_t transport, uint32_t assoc_group_id) { NTSTATUS status; - const char *binding = lp_parm_string(-1, "torture", "binding"); + const char *binding = torture_setting_string(tctx, "binding", NULL); struct dcerpc_binding *b; - TALLOC_CTX *mem_ctx = talloc_named(parent_ctx, 0, "torture_rpc_connection_smb"); + TALLOC_CTX *mem_ctx = talloc_named(tctx, 0, "torture_rpc_connection_smb"); if (!binding) { printf("You must specify a ncacn binding string\n"); @@ -83,7 +83,7 @@ NTSTATUS torture_rpc_connection_transport(TALLOC_CTX *parent_ctx, cmdline_credentials, NULL); if (NT_STATUS_IS_OK(status)) { - *p = talloc_reference(parent_ctx, *p); + *p = talloc_reference(tctx, *p); } else { *p = NULL; } @@ -219,7 +219,7 @@ NTSTATUS torture_rpc_init(void) 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, "SRVSVC", torture_rpc_srvsvc); - torture_suite_add_simple_test(suite, "SVCCTL", torture_rpc_svcctl); + torture_suite_add_suite(suite, torture_rpc_svcctl(suite)); torture_suite_add_simple_test(suite, "EPMAPPER", torture_rpc_epmapper); torture_suite_add_simple_test(suite, "INITSHUTDOWN", torture_rpc_initshutdown); torture_suite_add_simple_test(suite, "OXIDRESOLVE", torture_rpc_oxidresolve); |