summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-01-30 09:14:00 +0100
committerGünther Deschner <gd@samba.org>2014-02-13 11:54:13 +0100
commit16b56d7726f419ec2ec831f90f9e1b26e30d4543 (patch)
tree595b6a9b12b6f401ea0c596bc9b1ff1272d02b0a
parent05193b39deeb4ace801a28ed8a1b6f2d51594b78 (diff)
downloadsamba-16b56d7726f419ec2ec831f90f9e1b26e30d4543.tar.gz
samba-16b56d7726f419ec2ec831f90f9e1b26e30d4543.tar.xz
samba-16b56d7726f419ec2ec831f90f9e1b26e30d4543.zip
s4:torture/rpc: use dcerpc_parse_binding() in epmapper.c
This makes sure binding is talloc'ed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
-rw-r--r--source4/torture/rpc/epmapper.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index 44f806ce60..501cf01f5d 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -143,7 +143,7 @@ static bool test_Map_tcpip(struct torture_context *tctx,
struct GUID uuid;
struct policy_handle entry_handle;
struct ndr_syntax_id syntax;
- struct dcerpc_binding map_binding;
+ struct dcerpc_binding *map_binding;
struct epm_twr_t map_tower;
struct epm_twr_p_t towers[20];
struct epm_tower t;
@@ -170,13 +170,13 @@ static bool test_Map_tcpip(struct torture_context *tctx,
r.out.num_towers = &num_towers;
/* Create map tower */
- ZERO_STRUCT(map_binding);
- map_binding.transport = NCACN_IP_TCP;
- map_binding.object = map_syntax;
- map_binding.host = "0.0.0.0";
- map_binding.endpoint = "135";
+ status = dcerpc_parse_binding(tctx, "ncacn_ip_tcp:[135]", &map_binding);
+ torture_assert_ntstatus_ok(tctx, status,
+ "epm_Map_tcpip failed: can't create map_binding");
+
+ map_binding->object = map_syntax;
- status = dcerpc_binding_build_tower(tctx, &map_binding,
+ status = dcerpc_binding_build_tower(tctx, map_binding,
&map_tower.tower);
torture_assert_ntstatus_ok(tctx, status,
"epm_Map_tcpip failed: can't create map_tower");