[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha5-85-g34f8b2a

Stefan Metzmacher metze at samba.org
Wed Jul 16 13:20:39 GMT 2008


The branch, v4-0-test has been updated
       via  34f8b2abdd546f6b60ddae2ad839119f211c995c (commit)
       via  35c7fa470a7433d081403b2b57a331c7dc287aef (commit)
       via  511847f5f5015bcdef69e80b91cb08ffb1690e59 (commit)
       via  4e0708148a121bd41a12abf6122d5d6f3f09667a (commit)
       via  67931092128ce89aadf689a54e20d6e4a9d7fe2c (commit)
       via  9e99e59ca7e56bf74417ec85339e09e86f50d17e (commit)
       via  a6198ab6cb829969b12068324d870966a6cfc029 (commit)
       via  de2aed042d09ae7a31ddc4cd920c8fcf193ba06a (commit)
       via  a681e55067a83f06e465b81afb2b0b870b674dca (commit)
       via  d9d19eef4f67da89e7d818d23a2372bee6f86dba (commit)
       via  ce12a9105113ad7cff96b7d553a8d69901c56de7 (commit)
       via  6acf42c2e41bb1d44c1fcaaaa58fc3f148491836 (commit)
      from  f567e17758cfe937249beafae0a9087b67b27755 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 34f8b2abdd546f6b60ddae2ad839119f211c995c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 16 13:02:54 2008 +0200

    drsuapi: print out the number of linked attribute values we got
    
    metze

commit 35c7fa470a7433d081403b2b57a331c7dc287aef
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 16 13:01:56 2008 +0200

    drsuapi: make use of the 'more_data' field in DsGetNCChangesCtr[1|6]
    
    metze

commit 511847f5f5015bcdef69e80b91cb08ffb1690e59
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 16 13:00:07 2008 +0200

    drsuapi: check ctr6->drs_error
    
    metze

commit 4e0708148a121bd41a12abf6122d5d6f3f09667a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 16 12:58:29 2008 +0200

    drsuapi: get ctr6 out of xpress compressed level
    
    metze

commit 67931092128ce89aadf689a54e20d6e4a9d7fe2c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jul 15 16:59:09 2008 +0200

    drsuapi: total_object_count was the wrong guess
    
    The total_object_count member of DsGetNCChangesCtr[1|6] was wrong
    it's the error code of an extended operation.
    
    DsGetNCChangesCtr6 has a nc_object_count value which contains
    the estimated amount of objects in the naming_context.
    
    W2k seems to have a bug and sends this number of objects
    in the extended_ret field. Maybe it's just a bug and
    not a feature:-)
    
    metze

commit 9e99e59ca7e56bf74417ec85339e09e86f50d17e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jul 15 15:36:54 2008 +0200

    drsuapi.idl: fix unknowns in drsuapi_DsGetNCChangesCtr*
    
    metze

commit a6198ab6cb829969b12068324d870966a6cfc029
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jul 15 16:58:16 2008 +0200

    libnet/become_dc: an unknown field in drsuapi.idl changed to object_flags
    
    metze

commit de2aed042d09ae7a31ddc4cd920c8fcf193ba06a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jul 15 15:35:47 2008 +0200

    drsuapi.idl: fix unknowns in drsuapi_DsReplicaObject*
    
    metze

commit a681e55067a83f06e465b81afb2b0b870b674dca
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jul 15 15:34:23 2008 +0200

    drsuapi.idl: fix unknowns in drsuapi_DsReplicaCursor[2]
    
    metze

commit d9d19eef4f67da89e7d818d23a2372bee6f86dba
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Jul 11 08:19:53 2008 +0000

    drsuapi.idl: correctly handle xpress compressed payload
    
    metze
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit ce12a9105113ad7cff96b7d553a8d69901c56de7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jul 16 11:30:47 2008 +0200

    become_dc: we need to replicate using krb5 auth to work against w2k
    
    With NTLMSSP we just get strange responses with a random object count
    and a NULL object list. On the domain partition where we try to replicate
    the password fields.
    
    metze

commit 6acf42c2e41bb1d44c1fcaaaa58fc3f148491836
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jul 15 18:28:25 2008 +0200

    NET-API-BECOME-DC: fix crash bugs because of unintialized variables
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source/dsdb/repl/drepl_out_helpers.c    |   22 +++++++----
 source/libnet/libnet_become_dc.c        |   27 ++++++++++---
 source/libnet/libnet_become_dc.h        |    1 +
 source/libnet/libnet_vampire.c          |   60 ++++++++++++++++------------
 source/librpc/idl/drsuapi.idl           |   64 +++++++++++++++++++++---------
 source/librpc/ndr/ndr_drsuapi.c         |    2 +-
 source/torture/libnet/libnet_BecomeDC.c |   65 ++++++++++++++++++-------------
 source/torture/rpc/dssync.c             |    9 +++-
 8 files changed, 161 insertions(+), 89 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/dsdb/repl/drepl_out_helpers.c b/source/dsdb/repl/drepl_out_helpers.c
index d79d94f..281e569 100644
--- a/source/dsdb/repl/drepl_out_helpers.c
+++ b/source/dsdb/repl/drepl_out_helpers.c
@@ -316,11 +316,23 @@ static void dreplsrv_op_pull_source_get_changes_recv(struct rpc_request *req)
 		   r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP) {
 		ctr_level = 6;
 		ctr6 = r->out.ctr.ctr7.ctr.mszip6.ctr6;
+	} else if (*r->out.level == 7 &&
+		   r->out.ctr.ctr7.level == 6 &&
+		   r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS) {
+		ctr_level = 6;
+		ctr6 = r->out.ctr.ctr7.ctr.xpress6.ctr6;
 	} else {
 		composite_error(c, werror_to_ntstatus(WERR_BAD_NET_RESP));
 		return;
 	}
 
+	if (ctr_level == 6) {
+		if (!W_ERROR_IS_OK(ctr6->drs_error)) {
+			composite_error(c, werror_to_ntstatus(ctr6->drs_error));
+			return;
+		}
+	}
+
 	dreplsrv_op_pull_source_apply_changes_send(st, r, ctr_level, ctr1, ctr6);
 }
 
@@ -353,6 +365,7 @@ static void dreplsrv_op_pull_source_apply_changes_send(struct dreplsrv_op_pull_s
 		linked_attributes		= NULL;
 		rf1.highwatermark		= ctr1->new_highwatermark;
 		uptodateness_vector		= NULL; /* TODO: map it */
+		more_data			= ctr1->more_data;
 		break;
 	case 6:
 		mapping_ctr			= &ctr6->mapping_ctr;
@@ -362,6 +375,7 @@ static void dreplsrv_op_pull_source_apply_changes_send(struct dreplsrv_op_pull_s
 		linked_attributes		= ctr6->linked_attributes;
 		rf1.highwatermark		= ctr6->new_highwatermark;
 		uptodateness_vector		= ctr6->uptodateness_vector;
+		more_data			= ctr6->more_data;
 		break;
 	default:
 		composite_error(c, werror_to_ntstatus(WERR_BAD_NET_RESP));
@@ -392,14 +406,6 @@ static void dreplsrv_op_pull_source_apply_changes_send(struct dreplsrv_op_pull_s
 	 * TODO: update our uptodatevector!
 	 */
 
-	/*
-	 * if the tmp_highest_usn is higher than highest_usn
-	 * there's more to pull from this source_dsa
-	 */
-	if (rf1.highwatermark.tmp_highest_usn > rf1.highwatermark.highest_usn) {
-		more_data = true;
-	}
-
 	if (more_data) {
 		dreplsrv_op_pull_source_get_changes_send(st);
 		return;
diff --git a/source/libnet/libnet_become_dc.c b/source/libnet/libnet_become_dc.c
index d3eeebe..3fece1a 100644
--- a/source/libnet/libnet_become_dc.c
+++ b/source/libnet/libnet_become_dc.c
@@ -1517,10 +1517,10 @@ static void becomeDC_drsuapi_connect_send(struct libnet_BecomeDC_state *s,
 
 	if (!drsuapi->binding) {
 		if (lp_parm_bool(s->libnet->lp_ctx, NULL, "become_dc", "print", false)) {
-			binding_str = talloc_asprintf(s, "ncacn_ip_tcp:%s[print,seal]", s->source_dsa.dns_name);
+			binding_str = talloc_asprintf(s, "ncacn_ip_tcp:%s[krb5,print,seal]", s->source_dsa.dns_name);
 			if (composite_nomem(binding_str, c)) return;
 		} else {
-			binding_str = talloc_asprintf(s, "ncacn_ip_tcp:%s[seal]", s->source_dsa.dns_name);
+			binding_str = talloc_asprintf(s, "ncacn_ip_tcp:%s[krb5,seal]", s->source_dsa.dns_name);
 			if (composite_nomem(binding_str, c)) return;
 		}
 		c->status = dcerpc_parse_binding(s, binding_str, &drsuapi->binding);
@@ -2159,7 +2159,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
 	r->in.level							= 2;
 	r->in.req.req2.first_object.next_object				= NULL;
 	r->in.req.req2.first_object.object.identifier			= identifier;
-	r->in.req.req2.first_object.object.unknown1			= 0x00000000;	
+	r->in.req.req2.first_object.object.flags			= 0x00000000;
 	r->in.req.req2.first_object.object.attribute_ctr.num_attributes	= num_attrs;
 	r->in.req.req2.first_object.object.attribute_ctr.attributes	= attrs;
 
@@ -2434,6 +2434,7 @@ static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state
 	struct GUID *source_dsa_guid;
 	struct GUID *source_dsa_invocation_id;
 	struct drsuapi_DsReplicaHighWaterMark *new_highwatermark;
+	bool more_data = false;
 	NTSTATUS nt_status;
 
 	if (!W_ERROR_IS_OK(r->out.result)) {
@@ -2454,26 +2455,40 @@ static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state
 		   r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP) {
 		ctr_level = 6;
 		ctr6 = r->out.ctr.ctr7.ctr.mszip6.ctr6;
+	} else if (*r->out.level == 7 &&
+		   r->out.ctr.ctr7.level == 6 &&
+		   r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS) {
+		ctr_level = 6;
+		ctr6 = r->out.ctr.ctr7.ctr.xpress6.ctr6;
 	} else {
 		return WERR_BAD_NET_RESP;
 	}
 
+	if (ctr_level == 6) {
+		if (!W_ERROR_IS_OK(ctr6->drs_error)) {
+			return ctr6->drs_error;
+		}
+	}
+
 	switch (ctr_level) {
 	case 1:
 		source_dsa_guid			= &ctr1->source_dsa_guid;
 		source_dsa_invocation_id	= &ctr1->source_dsa_invocation_id;
 		new_highwatermark		= &ctr1->new_highwatermark;
+		more_data			= ctr1->more_data;
 		break;
 	case 6:
 		source_dsa_guid			= &ctr6->source_dsa_guid;
 		source_dsa_invocation_id	= &ctr6->source_dsa_invocation_id;
 		new_highwatermark		= &ctr6->new_highwatermark;
+		more_data			= ctr6->more_data;
 		break;
 	}
 
 	partition->highwatermark		= *new_highwatermark;
 	partition->source_dsa_guid		= *source_dsa_guid;
 	partition->source_dsa_invocation_id	= *source_dsa_invocation_id;
+	partition->more_data			= more_data;
 
 	if (!partition->store_chunk) return WERR_OK;
 
@@ -2554,7 +2569,7 @@ static void becomeDC_drsuapi3_pull_schema_recv(struct rpc_request *req)
 
 	talloc_free(r);
 
-	if (s->schema_part.highwatermark.tmp_highest_usn > s->schema_part.highwatermark.highest_usn) {
+	if (s->schema_part.more_data) {
 		becomeDC_drsuapi_pull_partition_send(s, &s->drsuapi2, &s->drsuapi3, &s->schema_part,
 						     becomeDC_drsuapi3_pull_schema_recv);
 		return;
@@ -2616,7 +2631,7 @@ static void becomeDC_drsuapi3_pull_config_recv(struct rpc_request *req)
 
 	talloc_free(r);
 
-	if (s->config_part.highwatermark.tmp_highest_usn > s->config_part.highwatermark.highest_usn) {
+	if (s->config_part.more_data) {
 		becomeDC_drsuapi_pull_partition_send(s, &s->drsuapi2, &s->drsuapi3, &s->config_part,
 						     becomeDC_drsuapi3_pull_config_recv);
 		return;
@@ -2683,7 +2698,7 @@ static void becomeDC_drsuapi3_pull_domain_recv(struct rpc_request *req)
 
 	talloc_free(r);
 
-	if (s->domain_part.highwatermark.tmp_highest_usn > s->domain_part.highwatermark.highest_usn) {
+	if (s->domain_part.more_data) {
 		becomeDC_drsuapi_pull_partition_send(s, &s->drsuapi2, &s->drsuapi3, &s->domain_part,
 						     becomeDC_drsuapi3_pull_domain_recv);
 		return;
diff --git a/source/libnet/libnet_become_dc.h b/source/libnet/libnet_become_dc.h
index 47b2896..58fc4dc 100644
--- a/source/libnet/libnet_become_dc.h
+++ b/source/libnet/libnet_become_dc.h
@@ -94,6 +94,7 @@ struct libnet_BecomeDC_Partition {
 	struct GUID source_dsa_guid;
 	struct GUID source_dsa_invocation_id;
 	struct drsuapi_DsReplicaHighWaterMark highwatermark;
+	bool more_data;
 	uint32_t replica_flags;
 
 	NTSTATUS (*store_chunk)(void *private_data,
diff --git a/source/libnet/libnet_vampire.c b/source/libnet/libnet_vampire.c
index 56a8ebe..42d6f72 100644
--- a/source/libnet/libnet_vampire.c
+++ b/source/libnet/libnet_vampire.c
@@ -136,7 +136,6 @@ static NTSTATUS vampire_apply_schema(struct vampire_state *s,
 {
 	WERROR status;
 	const struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr;
-	uint32_t total_object_count;
 	uint32_t object_count;
 	struct drsuapi_DsReplicaObjectListItemEx *first_object;
 	struct drsuapi_DsReplicaObjectListItemEx *cur;
@@ -164,7 +163,6 @@ static NTSTATUS vampire_apply_schema(struct vampire_state *s,
 	switch (c->ctr_level) {
 	case 1:
 		mapping_ctr			= &c->ctr1->mapping_ctr;
-		total_object_count		= c->ctr1->total_object_count;
 		object_count			= s->schema_part.object_count;
 		first_object			= s->schema_part.first_object;
 		linked_attributes_count		= 0;
@@ -176,7 +174,6 @@ static NTSTATUS vampire_apply_schema(struct vampire_state *s,
 		break;
 	case 6:
 		mapping_ctr			= &c->ctr6->mapping_ctr;
-		total_object_count		= c->ctr6->total_object_count;
 		object_count			= s->schema_part.object_count;
 		first_object			= s->schema_part.first_object;
 		linked_attributes_count		= 0; /* TODO: ! */
@@ -370,34 +367,41 @@ static NTSTATUS vampire_schema_chunk(void *private_data,
 	struct vampire_state *s = talloc_get_type(private_data, struct vampire_state);
 	WERROR status;
 	const struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr;
-	uint32_t total_object_count;
+	uint32_t nc_object_count;
 	uint32_t object_count;
 	struct drsuapi_DsReplicaObjectListItemEx *first_object;
 	struct drsuapi_DsReplicaObjectListItemEx *cur;
+	uint32_t nc_linked_attributes_count;
+	uint32_t linked_attributes_count;
 
 	switch (c->ctr_level) {
 	case 1:
-		mapping_ctr		= &c->ctr1->mapping_ctr;
-		total_object_count	= c->ctr1->total_object_count;
-		object_count		= c->ctr1->object_count;
-		first_object		= c->ctr1->first_object;
+		mapping_ctr			= &c->ctr1->mapping_ctr;
+		nc_object_count			= c->ctr1->extended_ret; /* maybe w2k send this unexpected? */
+		object_count			= c->ctr1->object_count;
+		first_object			= c->ctr1->first_object;
+		nc_linked_attributes_count	= 0;
+		linked_attributes_count		= 0;
 		break;
 	case 6:
-		mapping_ctr		= &c->ctr6->mapping_ctr;
-		total_object_count	= c->ctr6->total_object_count;
-		object_count		= c->ctr6->object_count;
-		first_object		= c->ctr6->first_object;
+		mapping_ctr			= &c->ctr6->mapping_ctr;
+		nc_object_count			= c->ctr6->nc_object_count;
+		object_count			= c->ctr6->object_count;
+		first_object			= c->ctr6->first_object;
+		nc_linked_attributes_count	= c->ctr6->nc_linked_attributes_count;
+		linked_attributes_count		= c->ctr6->linked_attributes_count;
 		break;
 	default:
 		return NT_STATUS_INVALID_PARAMETER;
 	}
 
-	if (total_object_count) {
-		DEBUG(0,("Schema-DN[%s] objects[%u/%u]\n",
-			c->partition->nc.dn, object_count, total_object_count));
+	if (nc_object_count) {
+		DEBUG(0,("Schema-DN[%s] objects[%u/%u] linked_values[%u/%u]\n",
+			c->partition->nc.dn, object_count, nc_object_count,
+			linked_attributes_count, nc_linked_attributes_count));
 	} else {
-		DEBUG(0,("Schema-DN[%s] objects[%u]\n",
-		c->partition->nc.dn, object_count));
+		DEBUG(0,("Schema-DN[%s] objects[%u] linked_values[%u\n",
+		c->partition->nc.dn, object_count, linked_attributes_count));
 	}
 
 	if (!s->schema) {
@@ -429,7 +433,7 @@ static NTSTATUS vampire_schema_chunk(void *private_data,
 	for (cur = first_object; cur->next_object; cur = cur->next_object) {}
 	s->schema_part.last_object = cur;
 
-	if (c->partition->highwatermark.tmp_highest_usn == c->partition->highwatermark.highest_usn) {
+	if (!c->partition->more_data) {
 		return vampire_apply_schema(s, c);
 	}
 
@@ -442,9 +446,10 @@ static NTSTATUS vampire_store_chunk(void *private_data,
 	struct vampire_state *s = talloc_get_type(private_data, struct vampire_state);
 	WERROR status;
 	const struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr;
-	uint32_t total_object_count;
+	uint32_t nc_object_count;
 	uint32_t object_count;
 	struct drsuapi_DsReplicaObjectListItemEx *first_object;
+	uint32_t nc_linked_attributes_count;
 	uint32_t linked_attributes_count;
 	struct drsuapi_DsReplicaLinkedAttribute *linked_attributes;
 	const struct drsuapi_DsReplicaCursor2CtrEx *uptodateness_vector;
@@ -461,9 +466,10 @@ static NTSTATUS vampire_store_chunk(void *private_data,
 	switch (c->ctr_level) {
 	case 1:
 		mapping_ctr			= &c->ctr1->mapping_ctr;
-		total_object_count		= c->ctr1->total_object_count;
+		nc_object_count			= c->ctr1->extended_ret; /* maybe w2k send this unexpected? */
 		object_count			= c->ctr1->object_count;
 		first_object			= c->ctr1->first_object;
+		nc_linked_attributes_count	= 0;
 		linked_attributes_count		= 0;
 		linked_attributes		= NULL;
 		s_dsa->highwatermark		= c->ctr1->new_highwatermark;
@@ -473,9 +479,10 @@ static NTSTATUS vampire_store_chunk(void *private_data,
 		break;
 	case 6:
 		mapping_ctr			= &c->ctr6->mapping_ctr;
-		total_object_count		= c->ctr6->total_object_count;
+		nc_object_count			= c->ctr6->nc_object_count;
 		object_count			= c->ctr6->object_count;
 		first_object			= c->ctr6->first_object;
+		nc_linked_attributes_count	= c->ctr6->nc_linked_attributes_count;
 		linked_attributes_count		= c->ctr6->linked_attributes_count;
 		linked_attributes		= c->ctr6->linked_attributes;
 		s_dsa->highwatermark		= c->ctr6->new_highwatermark;
@@ -498,12 +505,13 @@ static NTSTATUS vampire_store_chunk(void *private_data,
 	NT_STATUS_HAVE_NO_MEMORY(tmp_dns_name);
 	s_dsa->other_info->dns_name = tmp_dns_name;
 
-	if (total_object_count) {
-		DEBUG(0,("Partition[%s] objects[%u/%u]\n",
-			c->partition->nc.dn, object_count, total_object_count));
+	if (nc_object_count) {
+		DEBUG(0,("Partition[%s] objects[%u/%u] linked_values[%u/%u]\n",
+			c->partition->nc.dn, object_count, nc_object_count,
+			linked_attributes_count, nc_linked_attributes_count));
 	} else {
-		DEBUG(0,("Partition[%s] objects[%u]\n",
-		c->partition->nc.dn, object_count));
+		DEBUG(0,("Partition[%s] objects[%u] linked_values[%u\n",
+		c->partition->nc.dn, object_count, linked_attributes_count));
 	}
 
 	status = dsdb_extended_replicated_objects_commit(s->ldb,
diff --git a/source/librpc/idl/drsuapi.idl b/source/librpc/idl/drsuapi.idl
index 6701d22..b9cff5d 100644
--- a/source/librpc/idl/drsuapi.idl
+++ b/source/librpc/idl/drsuapi.idl
@@ -192,10 +192,10 @@ interface drsuapi
 	} drsuapi_DsReplicaCursor;
 
 	typedef struct {
-		uint32 u1;
-		uint32 u2;
+		[value(1)] uint32 version;
+		[value(0)] uint32 reserved1;
 		[range(0,0x100000)] uint32 count;
-		uint32 u3;
+		[value(0)] uint32 reserved2;
 		[size_is(count)] drsuapi_DsReplicaCursor cursors[];
 	} drsuapi_DsReplicaCursorCtrEx;
 
@@ -241,6 +241,26 @@ interface drsuapi
 		DRSUAPI_EXOP_REPL_SECRET			= 0x00000007
 	} drsuapi_DsExtendedOperation;
 
+	typedef [flag(NDR_PAHEX),v1_enum] enum {
+		DRSUAPI_EXOP_ERR_NONE				= 0x00000000,
+		DRSUAPI_EXOP_ERR_SUCCESS			= 0x00000001,
+		DRSUAPI_EXOP_ERR_UNKNOWN_OP			= 0x00000002,
+		DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER			= 0x00000003,
+		DRSUAPI_EXOP_ERR_UPDATE_ERR			= 0x00000004,
+		DRSUAPI_EXOP_ERR_EXCEPTION			= 0x00000005,
+		DRSUAPI_EXOP_ERR_UNKNOWN_CALLER			= 0x00000006,
+		DRSUAPI_EXOP_ERR_RID_ALLOC			= 0x00000007,
+		DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED		= 0x00000008,
+		DRSUAPI_EXOP_ERR_FMSO_PENDING_OP		= 0x00000009,
+		DRSUAPI_EXOP_ERR_MISMATCH			= 0x0000000A,
+		DRSUAPI_EXOP_ERR_COULDNT_CONTACT		= 0x0000000B,
+		DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES		= 0x0000000C,
+		DRSUAPI_EXOP_ERR_DIR_ERROR			= 0x0000000D,
+		DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS		= 0x0000000E,
+		DRSUAPI_EXOP_ERR_ACCESS_DENIED			= 0x0000000F,
+		DRSUAPI_EXOP_ERR_PARAM_ERROR			= 0x00000010
+	} drsuapi_DsExtendedError;
+
 	typedef struct {
 		GUID destination_dsa_guid;
 		GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
@@ -446,10 +466,10 @@ interface drsuapi
 	} drsuapi_DsReplicaCursor2;
 
 	typedef struct {
-		uint32 u1;
-		uint32 u2;
+		[value(2)] uint32 version;
+		[value(0)] uint32 reserved1;
 		[range(0,0x100000)] uint32 count;
-		uint32 u3;
+		[value(0)] uint32 reserved2;
 		[size_is(count)] drsuapi_DsReplicaCursor2 cursors[];
 	} drsuapi_DsReplicaCursor2CtrEx;
 
@@ -495,9 +515,15 @@ interface drsuapi
 		[size_is(num_attributes)]  drsuapi_DsReplicaAttribute *attributes;
 	} drsuapi_DsReplicaAttributeCtr;
 
+	typedef [public] bitmap {
+		DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER	= 0x00000001,
+		DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC	= 0x00000002,
+		DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY	= 0x00010000
+	} drsuapi_DsReplicaObjectFlags;
+
 	typedef [public] struct {
 		drsuapi_DsReplicaObjectIdentifier *identifier;
-		uint32 unknown1;
+		drsuapi_DsReplicaObjectFlags flags;
 		drsuapi_DsReplicaAttributeCtr attribute_ctr;
 	} drsuapi_DsReplicaObject;
 
@@ -516,7 +542,7 @@ interface drsuapi
 	typedef [public,noprint] struct {
 		drsuapi_DsReplicaObjectListItemEx *next_object;
 		drsuapi_DsReplicaObject object;
-		uint32 unknown1;
+		boolean32 is_nc_prefix;
 		GUID *parent_object_guid;
 		drsuapi_DsReplicaMetaDataCtr *meta_data_ctr;
 	} drsuapi_DsReplicaObjectListItemEx;
@@ -529,12 +555,12 @@ interface drsuapi
 		drsuapi_DsReplicaHighWaterMark new_highwatermark;
 		drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
 		drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
-		uint32 total_object_count;
+		drsuapi_DsExtendedError extended_ret; /* w2k sends the nc_object_count value here */
 		uint32 object_count;
 		/* this +55 is sometimes +56, so I don't know where this comes from... --metze */
 		[value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->flags)+55)] uint32 __ndr_size;
 		drsuapi_DsReplicaObjectListItemEx *first_object;
-		uint32 unknown4;
+		boolean32 more_data;
 	} drsuapi_DsGetNCChangesCtr1;
 
 	/*
@@ -562,17 +588,17 @@ interface drsuapi
 		drsuapi_DsReplicaHighWaterMark new_highwatermark;
 		drsuapi_DsReplicaCursor2CtrEx *uptodateness_vector;
 		drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
-		uint32 total_object_count;
+		drsuapi_DsExtendedError extended_ret;
 		uint32 object_count;
 		/* this +55 is sometimes +56, so I don't know where this comes from... --metze */
 		[value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->flags)+55)] uint32 __ndr_size;
 		drsuapi_DsReplicaObjectListItemEx *first_object;
-		uint32 unknown4;
-		uint32 unknown5;
-		uint32 unknown6;
+		boolean32 more_data;
+		uint32 nc_object_count; /* estimated amount of objects in the whole NC */
+		uint32 nc_linked_attributes_count;  /* estimated amount of linked values in the whole NC */
 		[range(0,1048576)] uint32 linked_attributes_count;
 		[size_is(linked_attributes_count)] drsuapi_DsReplicaLinkedAttribute *linked_attributes;
-		uint32 unknown7;
+		WERROR drs_error;
 	} drsuapi_DsGetNCChangesCtr6;
 
 	typedef struct {
@@ -595,16 +621,16 @@ interface drsuapi
 		uint32 decompressed_length;
 		uint32 compressed_length;
 		[subcontext(4),subcontext_size(compressed_length),
-		 compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),
-		 flag(NDR_REMAINING)] DATA_BLOB *decompressed;
+		 compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)]
+		 drsuapi_DsGetNCChangesCtr1 *ctr1;
 	} drsuapi_DsGetNCChangesXPRESSCtr1;
 
 	typedef struct {
 		uint32 decompressed_length;
 		uint32 compressed_length;
 		[subcontext(4),subcontext_size(compressed_length),
-		 compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),
-		 flag(NDR_REMAINING)] DATA_BLOB *decompressed;
+		 compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)]
+		 drsuapi_DsGetNCChangesCtr6 *ctr6;
 	} drsuapi_DsGetNCChangesXPRESSCtr6;
 
 	typedef [enum16bit] enum {
diff --git a/source/librpc/ndr/ndr_drsuapi.c b/source/librpc/ndr/ndr_drsuapi.c
index 9f755ff..1b6be9e 100644
--- a/source/librpc/ndr/ndr_drsuapi.c
+++ b/source/librpc/ndr/ndr_drsuapi.c
@@ -44,7 +44,7 @@ void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const ch
 	ndr->depth++;
 	ndr_print_ptr(ndr, "next_object", r->next_object);
 	ndr_print_drsuapi_DsReplicaObject(ndr, "object", &r->object);
-	ndr_print_uint32(ndr, "unknown1", r->unknown1);
+	ndr_print_uint32(ndr, "is_nc_prefix", r->is_nc_prefix);
 	ndr_print_ptr(ndr, "parent_object_guid", r->parent_object_guid);
 	ndr->depth++;
 	if (r->parent_object_guid) {
diff --git a/source/torture/libnet/libnet_BecomeDC.c b/source/torture/libnet/libnet_BecomeDC.c
index 97a5ca9..463d2a5 100644
--- a/source/torture/libnet/libnet_BecomeDC.c
+++ b/source/torture/libnet/libnet_BecomeDC.c
@@ -75,10 +75,13 @@ static NTSTATUS test_become_dc_prepare_db(void *private_data,
 	settings.domain_dn_str = p->domain->dn_str;
 	settings.config_dn_str = p->forest->config_dn_str;
 	settings.schema_dn_str = p->forest->schema_dn_str;
+	settings.server_dn_str = torture_join_server_dn_str(s->tj);
+	settings.invocation_id = &p->dest_dsa->invocation_id;
 	settings.netbios_name = p->dest_dsa->netbios_name;
+	settings.host_ip = NULL;
 	settings.realm = torture_join_dom_dns_name(s->tj);
 	settings.domain = torture_join_dom_netbios_name(s->tj);
-	settings.server_dn_str = torture_join_server_dn_str(s->tj);
+	settings.ntds_dn_str = p->dest_dsa->ntds_dn_str;
 	settings.machine_password = cli_credentials_get_password(s->machine_account);
 	settings.targetdir = s->targetdir;
 
@@ -120,7 +123,6 @@ static NTSTATUS test_apply_schema(struct test_become_dc_state *s,
 {
 	WERROR status;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list