svn commit: samba r21516 - in branches/SAMBA_4_0/source/libnet: .

metze at samba.org metze at samba.org
Fri Feb 23 11:04:05 GMT 2007


Author: metze
Date: 2007-02-23 11:04:05 +0000 (Fri, 23 Feb 2007)
New Revision: 21516

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21516

Log:
- 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
Modified:
   branches/SAMBA_4_0/source/libnet/libnet_become_dc.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_become_dc.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_become_dc.c	2007-02-23 11:00:20 UTC (rev 21515)
+++ branches/SAMBA_4_0/source/libnet/libnet_become_dc.c	2007-02-23 11:04:05 UTC (rev 21516)
@@ -1487,6 +1487,7 @@
 	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 @@
 	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 @@
 		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 @@
 	 * 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 @@
 	 * 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)) {



More information about the samba-cvs mailing list