diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-02-23 11:04:05 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:48 -0500 |
commit | d92bc6db36880d973b19a07fca69876eb33796a0 (patch) | |
tree | 07a6428bc1ce9e9f4e4564f0a5b2ee0e7b7b7919 /source4 | |
parent | 1b17d9a587bf3600d449c2481fe1191793479e32 (diff) | |
download | samba-d92bc6db36880d973b19a07fca69876eb33796a0.tar.gz samba-d92bc6db36880d973b19a07fca69876eb33796a0.tar.bz2 samba-d92bc6db36880d973b19a07fca69876eb33796a0.zip |
r21516: - use the same assoc_group_id, for all 3 drsuapi connection
- use the PFC_CONC_MPX flag for the 3rd connection
- to DsGetNCChanges requests on the 3rd connection with the bind handle
from the 2nd connection to match w2k3
metze
(This used to be commit 5071af332c2c079fd94c577e58ee6e8ccf157ffa)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libnet/libnet_become_dc.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c index 9f54fa646f..bb7b4bb613 100644 --- a/source4/libnet/libnet_become_dc.c +++ b/source4/libnet/libnet_become_dc.c @@ -1487,6 +1487,7 @@ static void becomeDC_drsuapi1_add_entry_recv(struct rpc_request *req) struct composite_context *c = s->creq; struct drsuapi_DsAddEntry *r = talloc_get_type(req->ndr.struct_ptr, struct drsuapi_DsAddEntry); + char *binding_str; bool print = false; if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) { @@ -1565,6 +1566,17 @@ static void becomeDC_drsuapi1_add_entry_recv(struct rpc_request *req) c->status = becomeDC_prepare_db(s); if (!composite_is_ok(c)) return; + /* this avoids the epmapper lookup on the 2nd connection */ + binding_str = dcerpc_binding_string(s, s->drsuapi1.binding); + if (composite_nomem(binding_str, c)) return; + + c->status = dcerpc_parse_binding(s, binding_str, &s->drsuapi2.binding); + talloc_free(binding_str); + if (!composite_is_ok(c)) return; + + /* w2k3 uses the same assoc_group_id as on the first connection, so we do */ + s->drsuapi2.binding->assoc_group_id = s->drsuapi1.pipe->assoc_group_id; + becomeDC_drsuapi_connect_send(s, &s->drsuapi2, becomeDC_drsuapi2_connect_recv); } @@ -1627,14 +1639,19 @@ static void becomeDC_drsuapi2_bind_recv(struct rpc_request *req) return; } - /* this avoids the epmapper lookup on the 2nd connection */ - binding_str = dcerpc_binding_string(s, s->drsuapi2.binding); + /* this avoids the epmapper lookup on the 3rd connection */ + binding_str = dcerpc_binding_string(s, s->drsuapi1.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; + /* w2k3 uses the same assoc_group_id as on the first connection, so we do */ + s->drsuapi3.binding->assoc_group_id = s->drsuapi1.pipe->assoc_group_id; + /* w2k3 uses the concurrent multiplex feature on the 3rd connection, so we do */ + s->drsuapi3.binding->flags |= DCERPC_CONCURRENT_MULTIPLEX; + becomeDC_drsuapi_connect_send(s, &s->drsuapi3, becomeDC_drsuapi3_connect_recv); } @@ -1711,7 +1728,7 @@ static void becomeDC_drsuapi_pull_partition_send(struct libnet_BecomeDC_state *s * are needed for it. Or the same KRB5 TGS is needed on both * connections. */ - req = dcerpc_drsuapi_DsGetNCChanges_send(drsuapi_h->pipe, r, r); + req = dcerpc_drsuapi_DsGetNCChanges_send(drsuapi_p->pipe, r, r); composite_continue_rpc(c, req, recv_fn, s); } @@ -1782,7 +1799,7 @@ static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state * we need to use the drsuapi_p->gensec_skey here, * when we use drsuapi_p->pipe in the for this request */ - s->_sc.gensec_skey = &drsuapi_h->gensec_skey; + s->_sc.gensec_skey = &drsuapi_p->gensec_skey; nt_status = partition->store_chunk(s->callbacks.private_data, &s->_sc); if (!NT_STATUS_IS_OK(nt_status)) { |