summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-09 15:27:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:05 -0500
commit04b50f0f0dad8c78a667d45ecfb8e4f83fa33521 (patch)
treed9901d89785a0d9279f9a228eee00c1ba9814ff0 /source4/libnet
parent913d1a91b807db6ffb766ebaa4bee1bfc2c1d849 (diff)
downloadsamba-04b50f0f0dad8c78a667d45ecfb8e4f83fa33521.tar.gz
samba-04b50f0f0dad8c78a667d45ecfb8e4f83fa33521.tar.bz2
samba-04b50f0f0dad8c78a667d45ecfb8e4f83fa33521.zip
r20095: make a complete copy of the binding string
metze (This used to be commit b0ee1308928d4747639033807aa3f9441ba2ac14)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_become_dc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index 410e4f9c70..8b5c40bc04 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -1511,6 +1511,7 @@ static void becomeDC_drsuapi2_bind_recv(struct rpc_request *req)
struct libnet_BecomeDC_state *s = talloc_get_type(req->async.private,
struct libnet_BecomeDC_state);
struct composite_context *c = s->creq;
+ char *binding_str;
WERROR status;
c->status = dcerpc_ndr_request_recv(req);
@@ -1523,7 +1524,12 @@ static void becomeDC_drsuapi2_bind_recv(struct rpc_request *req)
}
/* this avoids the epmapper lookup on the 2nd connection */
- s->drsuapi3.binding = s->drsuapi2.binding;
+ binding_str = dcerpc_binding_string(s, s->drsuapi2.binding);
+ if (composite_nomem(binding_str, c)) return;
+
+ c->status = dcerpc_parse_binding(s, binding_str, &s->drsuapi3.binding);
+ talloc_free(binding_str);
+ if (!composite_is_ok(c)) return;
becomeDC_drsuapi_connect_send(s, &s->drsuapi3, becomeDC_drsuapi3_connect_recv);
}