summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-10-24 22:46:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:02:28 -0500
commit06b3879c8fec97ef5de9b969301611e28fff00de (patch)
tree0bdf15f1211d86b78b601edeea609e1904eb858f /source4/torture/rpc
parent36db6faff3d495f5906d8e34275493234c2399f8 (diff)
downloadsamba-06b3879c8fec97ef5de9b969301611e28fff00de.tar.gz
samba-06b3879c8fec97ef5de9b969301611e28fff00de.tar.bz2
samba-06b3879c8fec97ef5de9b969301611e28fff00de.zip
r3167: Add a member 'endpoint' to the dcerpc_binding struct to use instead of
options[0]. (This used to be commit 18582083af800abd3d8de40eb73255c8ae6598dd)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/mgmt.c16
-rw-r--r--source4/torture/rpc/scanner.c15
2 files changed, 6 insertions, 25 deletions
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));