diff options
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/local/binding_string.c | 4 | ||||
-rw-r--r-- | source4/torture/rpc/mgmt.c | 16 | ||||
-rw-r--r-- | source4/torture/rpc/scanner.c | 15 |
3 files changed, 7 insertions, 28 deletions
diff --git a/source4/torture/local/binding_string.c b/source4/torture/local/binding_string.c index 289e8a3894..0fd1b4fb56 100644 --- a/source4/torture/local/binding_string.c +++ b/source4/torture/local/binding_string.c @@ -64,9 +64,7 @@ static BOOL test_BindingString(TALLOC_CTX *mem_ctx, const char *binding) /* Compare to a stripped down version of the binding string because * the protocol tower doesn't contain the extra option data */ - if (b.options && b.options[0]) { - b.options[1] = NULL; - } + b.options = NULL; b.flags = 0; diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c index 91d5ceb540..7cbee61708 100644 --- a/source4/torture/rpc/mgmt.c +++ b/source4/torture/rpc/mgmt.c @@ -195,12 +195,6 @@ BOOL torture_rpc_mgmt(int dummy) return False; } - b.options = talloc_array_p(mem_ctx, const char *, 2); - if (!b.options) { - return False; - } - - for (i=0;dcerpc_pipes[i];i++) { /* some interfaces are not mappable */ if (dcerpc_pipes[i]->num_calls == 0 || @@ -211,20 +205,16 @@ BOOL torture_rpc_mgmt(int dummy) printf("\nTesting pipe '%s'\n", dcerpc_pipes[i]->name); if (b.transport == NCACN_IP_TCP) { - uint32_t port; - status = dcerpc_epm_map_tcp_port(b.host, + status = dcerpc_epm_map(mem_ctx, &b, dcerpc_pipes[i]->uuid, - dcerpc_pipes[i]->if_version, - &port); + dcerpc_pipes[i]->if_version); if (!NT_STATUS_IS_OK(status)) { printf("Failed to map port for uuid %s\n", dcerpc_pipes[i]->uuid); continue; } - b.options[0] = talloc_asprintf(mem_ctx, "%u", port); } else { - b.options[0] = dcerpc_pipes[i]->name; + b.endpoint = dcerpc_pipes[i]->name; } - b.options[1] = NULL; lp_set_cmdline("torture:binding", dcerpc_binding_string(mem_ctx, &b)); diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c index 0c2f8dfbbe..5719b7f0b3 100644 --- a/source4/torture/rpc/scanner.c +++ b/source4/torture/rpc/scanner.c @@ -150,11 +150,6 @@ BOOL torture_rpc_scanner(int dummy) return False; } - b.options = talloc_array_p(mem_ctx, const char *, 2); - if (!b.options) { - return False; - } - for (i=0;dcerpc_pipes[i];i++) { /* some interfaces are not mappable */ if (dcerpc_pipes[i]->num_calls == 0 || @@ -165,20 +160,16 @@ BOOL torture_rpc_scanner(int dummy) printf("\nTesting pipe '%s'\n", dcerpc_pipes[i]->name); if (b.transport == NCACN_IP_TCP) { - uint32_t port; - status = dcerpc_epm_map_tcp_port(b.host, + status = dcerpc_epm_map(mem_ctx, &b, dcerpc_pipes[i]->uuid, - dcerpc_pipes[i]->if_version, - &port); + dcerpc_pipes[i]->if_version); if (!NT_STATUS_IS_OK(status)) { printf("Failed to map port for uuid %s\n", dcerpc_pipes[i]->uuid); continue; } - b.options[0] = talloc_asprintf(mem_ctx, "%u", port); } else { - b.options[0] = dcerpc_pipes[i]->name; + b.endpoint = dcerpc_pipes[i]->name; } - b.options[1] = NULL; lp_set_cmdline("torture:binding", dcerpc_binding_string(mem_ctx, &b)); |