1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r20095: make a complete copy of the binding string

metze
This commit is contained in:
Stefan Metzmacher 2006-12-09 15:27:22 +00:00 committed by Gerald (Jerry) Carter
parent 1b6621814b
commit b0ee130892

View File

@ -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);
}