mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
s4-drsuapi: merge drsuapi_DsGetNCChanges from s3 drsuapi idl.
Guenther
This commit is contained in:
parent
6ddaf5f160
commit
dd49f7483b
@ -246,40 +246,42 @@ static void dreplsrv_op_pull_source_get_changes_send(struct dreplsrv_op_pull_sou
|
||||
r = talloc(st, struct drsuapi_DsGetNCChanges);
|
||||
if (composite_nomem(r, c)) return;
|
||||
|
||||
r->in.level = talloc(r, int32_t);
|
||||
if (composite_nomem(r->in.level, c)) return;
|
||||
r->out.level = talloc(r, int32_t);
|
||||
if (composite_nomem(r->out.level, c)) return;
|
||||
r->out.level_out = talloc(r, int32_t);
|
||||
if (composite_nomem(r->out.level_out, c)) return;
|
||||
r->in.req = talloc(r, union drsuapi_DsGetNCChangesRequest);
|
||||
if (composite_nomem(r->in.req, c)) return;
|
||||
r->out.ctr = talloc(r, union drsuapi_DsGetNCChangesCtr);
|
||||
if (composite_nomem(r->out.ctr, c)) return;
|
||||
|
||||
r->in.bind_handle = &drsuapi->bind_handle;
|
||||
if (drsuapi->remote_info28.supported_extensions & DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8) {
|
||||
*r->in.level = 8;
|
||||
r->in.req.req8.destination_dsa_guid = service->ntds_guid;
|
||||
r->in.req.req8.source_dsa_invocation_id = rf1->source_dsa_invocation_id;
|
||||
r->in.req.req8.naming_context = &partition->nc;
|
||||
r->in.req.req8.highwatermark = rf1->highwatermark;
|
||||
r->in.req.req8.uptodateness_vector = NULL;/*&partition->uptodatevector_ex;*/
|
||||
r->in.req.req8.replica_flags = rf1->replica_flags;
|
||||
r->in.req.req8.max_object_count = 133;
|
||||
r->in.req.req8.max_ndr_size = 1336811;
|
||||
r->in.req.req8.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r->in.req.req8.fsmo_info = 0;
|
||||
r->in.req.req8.partial_attribute_set = NULL;
|
||||
r->in.req.req8.partial_attribute_set_ex = NULL;
|
||||
r->in.req.req8.mapping_ctr.num_mappings = 0;
|
||||
r->in.req.req8.mapping_ctr.mappings = NULL;
|
||||
r->in.level = 8;
|
||||
r->in.req->req8.destination_dsa_guid = service->ntds_guid;
|
||||
r->in.req->req8.source_dsa_invocation_id= rf1->source_dsa_invocation_id;
|
||||
r->in.req->req8.naming_context = &partition->nc;
|
||||
r->in.req->req8.highwatermark = rf1->highwatermark;
|
||||
r->in.req->req8.uptodateness_vector = NULL;/*&partition->uptodatevector_ex;*/
|
||||
r->in.req->req8.replica_flags = rf1->replica_flags;
|
||||
r->in.req->req8.max_object_count = 133;
|
||||
r->in.req->req8.max_ndr_size = 1336811;
|
||||
r->in.req->req8.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r->in.req->req8.fsmo_info = 0;
|
||||
r->in.req->req8.partial_attribute_set = NULL;
|
||||
r->in.req->req8.partial_attribute_set_ex= NULL;
|
||||
r->in.req->req8.mapping_ctr.num_mappings= 0;
|
||||
r->in.req->req8.mapping_ctr.mappings = NULL;
|
||||
} else {
|
||||
*r->in.level = 5;
|
||||
r->in.req.req5.destination_dsa_guid = service->ntds_guid;
|
||||
r->in.req.req5.source_dsa_invocation_id = rf1->source_dsa_invocation_id;
|
||||
r->in.req.req5.naming_context = &partition->nc;
|
||||
r->in.req.req5.highwatermark = rf1->highwatermark;
|
||||
r->in.req.req5.uptodateness_vector = NULL;/*&partition->uptodatevector_ex;*/
|
||||
r->in.req.req5.replica_flags = rf1->replica_flags;
|
||||
r->in.req.req5.max_object_count = 133;
|
||||
r->in.req.req5.max_ndr_size = 1336770;
|
||||
r->in.req.req5.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r->in.req.req5.fsmo_info = 0;
|
||||
r->in.level = 5;
|
||||
r->in.req->req5.destination_dsa_guid = service->ntds_guid;
|
||||
r->in.req->req5.source_dsa_invocation_id= rf1->source_dsa_invocation_id;
|
||||
r->in.req->req5.naming_context = &partition->nc;
|
||||
r->in.req->req5.highwatermark = rf1->highwatermark;
|
||||
r->in.req->req5.uptodateness_vector = NULL;/*&partition->uptodatevector_ex;*/
|
||||
r->in.req->req5.replica_flags = rf1->replica_flags;
|
||||
r->in.req->req5.max_object_count = 133;
|
||||
r->in.req->req5.max_ndr_size = 1336770;
|
||||
r->in.req->req5.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r->in.req->req5.fsmo_info = 0;
|
||||
}
|
||||
|
||||
req = dcerpc_drsuapi_DsGetNCChanges_send(drsuapi->pipe, r, r);
|
||||
@ -311,28 +313,28 @@ static void dreplsrv_op_pull_source_get_changes_recv(struct rpc_request *req)
|
||||
return;
|
||||
}
|
||||
|
||||
if (*r->out.level == 1) {
|
||||
if (*r->out.level_out == 1) {
|
||||
ctr_level = 1;
|
||||
ctr1 = &r->out.ctr.ctr1;
|
||||
} else if (*r->out.level == 2 &&
|
||||
r->out.ctr.ctr2.mszip1.ts) {
|
||||
ctr1 = &r->out.ctr->ctr1;
|
||||
} else if (*r->out.level_out == 2 &&
|
||||
r->out.ctr->ctr2.mszip1.ts) {
|
||||
ctr_level = 1;
|
||||
ctr1 = &r->out.ctr.ctr2.mszip1.ts->ctr1;
|
||||
} else if (*r->out.level == 6) {
|
||||
ctr1 = &r->out.ctr->ctr2.mszip1.ts->ctr1;
|
||||
} else if (*r->out.level_out == 6) {
|
||||
ctr_level = 6;
|
||||
ctr6 = &r->out.ctr.ctr6;
|
||||
} else if (*r->out.level == 7 &&
|
||||
r->out.ctr.ctr7.level == 6 &&
|
||||
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
|
||||
r->out.ctr.ctr7.ctr.mszip6.ts) {
|
||||
ctr6 = &r->out.ctr->ctr6;
|
||||
} else if (*r->out.level_out == 7 &&
|
||||
r->out.ctr->ctr7.level == 6 &&
|
||||
r->out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
|
||||
r->out.ctr->ctr7.ctr.mszip6.ts) {
|
||||
ctr_level = 6;
|
||||
ctr6 = &r->out.ctr.ctr7.ctr.mszip6.ts->ctr6;
|
||||
} else if (*r->out.level == 7 &&
|
||||
r->out.ctr.ctr7.level == 6 &&
|
||||
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
|
||||
r->out.ctr.ctr7.ctr.xpress6.ts) {
|
||||
ctr6 = &r->out.ctr->ctr7.ctr.mszip6.ts->ctr6;
|
||||
} else if (*r->out.level_out == 7 &&
|
||||
r->out.ctr->ctr7.level == 6 &&
|
||||
r->out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
|
||||
r->out.ctr->ctr7.ctr.xpress6.ts) {
|
||||
ctr_level = 6;
|
||||
ctr6 = &r->out.ctr.ctr7.ctr.xpress6.ts->ctr6;
|
||||
ctr6 = &r->out.ctr->ctr7.ctr.xpress6.ts->ctr6;
|
||||
} else {
|
||||
composite_error(c, werror_to_ntstatus(WERR_BAD_NET_RESP));
|
||||
return;
|
||||
|
@ -2396,40 +2396,42 @@ static void becomeDC_drsuapi_pull_partition_send(struct libnet_BecomeDC_state *s
|
||||
r = talloc(s, struct drsuapi_DsGetNCChanges);
|
||||
if (composite_nomem(r, c)) return;
|
||||
|
||||
r->in.level = talloc(r, int32_t);
|
||||
if (composite_nomem(r->in.level, c)) return;
|
||||
r->out.level = talloc(r, int32_t);
|
||||
if (composite_nomem(r->out.level, c)) return;
|
||||
r->out.level_out = talloc(r, int32_t);
|
||||
if (composite_nomem(r->out.level_out, c)) return;
|
||||
r->in.req = talloc(r, union drsuapi_DsGetNCChangesRequest);
|
||||
if (composite_nomem(r->in.req, c)) return;
|
||||
r->out.ctr = talloc(r, union drsuapi_DsGetNCChangesCtr);
|
||||
if (composite_nomem(r->out.ctr, c)) return;
|
||||
|
||||
r->in.bind_handle = &drsuapi_h->bind_handle;
|
||||
if (drsuapi_h->remote_info28.supported_extensions & DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8) {
|
||||
*r->in.level = 8;
|
||||
r->in.req.req8.destination_dsa_guid = partition->destination_dsa_guid;
|
||||
r->in.req.req8.source_dsa_invocation_id = partition->source_dsa_invocation_id;
|
||||
r->in.req.req8.naming_context = &partition->nc;
|
||||
r->in.req.req8.highwatermark = partition->highwatermark;
|
||||
r->in.req.req8.uptodateness_vector = NULL;
|
||||
r->in.req.req8.replica_flags = partition->replica_flags;
|
||||
r->in.req.req8.max_object_count = 133;
|
||||
r->in.req.req8.max_ndr_size = 1336811;
|
||||
r->in.req.req8.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r->in.req.req8.fsmo_info = 0;
|
||||
r->in.req.req8.partial_attribute_set = NULL;
|
||||
r->in.req.req8.partial_attribute_set_ex = NULL;
|
||||
r->in.req.req8.mapping_ctr.num_mappings = 0;
|
||||
r->in.req.req8.mapping_ctr.mappings = NULL;
|
||||
r->in.level = 8;
|
||||
r->in.req->req8.destination_dsa_guid = partition->destination_dsa_guid;
|
||||
r->in.req->req8.source_dsa_invocation_id= partition->source_dsa_invocation_id;
|
||||
r->in.req->req8.naming_context = &partition->nc;
|
||||
r->in.req->req8.highwatermark = partition->highwatermark;
|
||||
r->in.req->req8.uptodateness_vector = NULL;
|
||||
r->in.req->req8.replica_flags = partition->replica_flags;
|
||||
r->in.req->req8.max_object_count = 133;
|
||||
r->in.req->req8.max_ndr_size = 1336811;
|
||||
r->in.req->req8.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r->in.req->req8.fsmo_info = 0;
|
||||
r->in.req->req8.partial_attribute_set = NULL;
|
||||
r->in.req->req8.partial_attribute_set_ex= NULL;
|
||||
r->in.req->req8.mapping_ctr.num_mappings= 0;
|
||||
r->in.req->req8.mapping_ctr.mappings = NULL;
|
||||
} else {
|
||||
*r->in.level = 5;
|
||||
r->in.req.req5.destination_dsa_guid = partition->destination_dsa_guid;
|
||||
r->in.req.req5.source_dsa_invocation_id = partition->source_dsa_invocation_id;
|
||||
r->in.req.req5.naming_context = &partition->nc;
|
||||
r->in.req.req5.highwatermark = partition->highwatermark;
|
||||
r->in.req.req5.uptodateness_vector = NULL;
|
||||
r->in.req.req5.replica_flags = partition->replica_flags;
|
||||
r->in.req.req5.max_object_count = 133;
|
||||
r->in.req.req5.max_ndr_size = 1336770;
|
||||
r->in.req.req5.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r->in.req.req5.fsmo_info = 0;
|
||||
r->in.level = 5;
|
||||
r->in.req->req5.destination_dsa_guid = partition->destination_dsa_guid;
|
||||
r->in.req->req5.source_dsa_invocation_id= partition->source_dsa_invocation_id;
|
||||
r->in.req->req5.naming_context = &partition->nc;
|
||||
r->in.req->req5.highwatermark = partition->highwatermark;
|
||||
r->in.req->req5.uptodateness_vector = NULL;
|
||||
r->in.req->req5.replica_flags = partition->replica_flags;
|
||||
r->in.req->req5.max_object_count = 133;
|
||||
r->in.req->req5.max_ndr_size = 1336770;
|
||||
r->in.req->req5.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r->in.req->req5.fsmo_info = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2461,28 +2463,28 @@ static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state
|
||||
return r->out.result;
|
||||
}
|
||||
|
||||
if (*r->out.level == 1) {
|
||||
if (*r->out.level_out == 1) {
|
||||
ctr_level = 1;
|
||||
ctr1 = &r->out.ctr.ctr1;
|
||||
} else if (*r->out.level == 2 &&
|
||||
r->out.ctr.ctr2.mszip1.ts) {
|
||||
ctr1 = &r->out.ctr->ctr1;
|
||||
} else if (*r->out.level_out == 2 &&
|
||||
r->out.ctr->ctr2.mszip1.ts) {
|
||||
ctr_level = 1;
|
||||
ctr1 = &r->out.ctr.ctr2.mszip1.ts->ctr1;
|
||||
} else if (*r->out.level == 6) {
|
||||
ctr1 = &r->out.ctr->ctr2.mszip1.ts->ctr1;
|
||||
} else if (*r->out.level_out == 6) {
|
||||
ctr_level = 6;
|
||||
ctr6 = &r->out.ctr.ctr6;
|
||||
} else if (*r->out.level == 7 &&
|
||||
r->out.ctr.ctr7.level == 6 &&
|
||||
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
|
||||
r->out.ctr.ctr7.ctr.mszip6.ts) {
|
||||
ctr6 = &r->out.ctr->ctr6;
|
||||
} else if (*r->out.level_out == 7 &&
|
||||
r->out.ctr->ctr7.level == 6 &&
|
||||
r->out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
|
||||
r->out.ctr->ctr7.ctr.mszip6.ts) {
|
||||
ctr_level = 6;
|
||||
ctr6 = &r->out.ctr.ctr7.ctr.mszip6.ts->ctr6;
|
||||
} else if (*r->out.level == 7 &&
|
||||
r->out.ctr.ctr7.level == 6 &&
|
||||
r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
|
||||
r->out.ctr.ctr7.ctr.xpress6.ts) {
|
||||
ctr6 = &r->out.ctr->ctr7.ctr.mszip6.ts->ctr6;
|
||||
} else if (*r->out.level_out == 7 &&
|
||||
r->out.ctr->ctr7.level == 6 &&
|
||||
r->out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
|
||||
r->out.ctr->ctr7.ctr.xpress6.ts) {
|
||||
ctr_level = 6;
|
||||
ctr6 = &r->out.ctr.ctr7.ctr.xpress6.ts->ctr6;
|
||||
ctr6 = &r->out.ctr->ctr7.ctr.xpress6.ts->ctr6;
|
||||
} else {
|
||||
return WERR_BAD_NET_RESP;
|
||||
}
|
||||
|
@ -700,9 +700,10 @@ interface drsuapi
|
||||
|
||||
WERROR drsuapi_DsGetNCChanges(
|
||||
[in] policy_handle *bind_handle,
|
||||
[in,out,ref] int32 *level,
|
||||
[in,switch_is(*level)] drsuapi_DsGetNCChangesRequest req,
|
||||
[out,switch_is(*level)] drsuapi_DsGetNCChangesCtr ctr
|
||||
[in] int32 level,
|
||||
[in,ref,switch_is(level)] drsuapi_DsGetNCChangesRequest *req,
|
||||
[out,ref] int32 *level_out,
|
||||
[out,ref,switch_is(*level_out)] drsuapi_DsGetNCChangesCtr *ctr
|
||||
);
|
||||
|
||||
/*****************/
|
||||
|
@ -525,6 +525,8 @@ static bool test_DsGetNCChanges(struct dcerpc_pipe *p, struct torture_context *t
|
||||
bool ret = true;
|
||||
int i;
|
||||
struct drsuapi_DsGetNCChanges r;
|
||||
union drsuapi_DsGetNCChangesRequest req;
|
||||
union drsuapi_DsGetNCChangesCtr ctr;
|
||||
struct drsuapi_DsReplicaObjectIdentifier nc;
|
||||
struct GUID null_guid;
|
||||
struct dom_sid null_sid;
|
||||
@ -553,30 +555,32 @@ static bool test_DsGetNCChanges(struct dcerpc_pipe *p, struct torture_context *t
|
||||
array[i].level);
|
||||
|
||||
r.in.bind_handle = &priv->bind_handle;
|
||||
r.in.level = &array[i].level;
|
||||
r.out.level = &level_out;
|
||||
r.in.level = array[i].level;
|
||||
r.out.level_out = &level_out;
|
||||
r.out.ctr = &ctr;
|
||||
|
||||
switch (*r.in.level) {
|
||||
switch (r.in.level) {
|
||||
case 5:
|
||||
nc.guid = null_guid;
|
||||
nc.sid = null_sid;
|
||||
nc.dn = priv->domain_obj_dn?priv->domain_obj_dn:"";
|
||||
|
||||
r.in.req.req5.destination_dsa_guid = GUID_random();
|
||||
r.in.req.req5.source_dsa_invocation_id = null_guid;
|
||||
r.in.req.req5.naming_context = &nc;
|
||||
r.in.req.req5.highwatermark.tmp_highest_usn = 0;
|
||||
r.in.req.req5.highwatermark.reserved_usn = 0;
|
||||
r.in.req.req5.highwatermark.highest_usn = 0;
|
||||
r.in.req.req5.uptodateness_vector = NULL;
|
||||
r.in.req.req5.replica_flags = 0;
|
||||
r.in.req = &req;
|
||||
r.in.req->req5.destination_dsa_guid = GUID_random();
|
||||
r.in.req->req5.source_dsa_invocation_id = null_guid;
|
||||
r.in.req->req5.naming_context = &nc;
|
||||
r.in.req->req5.highwatermark.tmp_highest_usn = 0;
|
||||
r.in.req->req5.highwatermark.reserved_usn = 0;
|
||||
r.in.req->req5.highwatermark.highest_usn = 0;
|
||||
r.in.req->req5.uptodateness_vector = NULL;
|
||||
r.in.req->req5.replica_flags = 0;
|
||||
if (lp_parm_bool(tctx->lp_ctx, NULL, "drsuapi","compression", false)) {
|
||||
r.in.req.req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
|
||||
r.in.req->req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
|
||||
}
|
||||
r.in.req.req5.max_object_count = 0;
|
||||
r.in.req.req5.max_ndr_size = 0;
|
||||
r.in.req.req5.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r.in.req.req5.fsmo_info = 0;
|
||||
r.in.req->req5.max_object_count = 0;
|
||||
r.in.req->req5.max_ndr_size = 0;
|
||||
r.in.req->req5.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r.in.req->req5.fsmo_info = 0;
|
||||
|
||||
break;
|
||||
case 8:
|
||||
@ -584,33 +588,34 @@ static bool test_DsGetNCChanges(struct dcerpc_pipe *p, struct torture_context *t
|
||||
nc.sid = null_sid;
|
||||
nc.dn = priv->domain_obj_dn?priv->domain_obj_dn:"";
|
||||
|
||||
r.in.req.req8.destination_dsa_guid = GUID_random();
|
||||
r.in.req.req8.source_dsa_invocation_id = null_guid;
|
||||
r.in.req.req8.naming_context = &nc;
|
||||
r.in.req.req8.highwatermark.tmp_highest_usn = 0;
|
||||
r.in.req.req8.highwatermark.reserved_usn = 0;
|
||||
r.in.req.req8.highwatermark.highest_usn = 0;
|
||||
r.in.req.req8.uptodateness_vector = NULL;
|
||||
r.in.req.req8.replica_flags = 0;
|
||||
r.in.req = &req;
|
||||
r.in.req->req8.destination_dsa_guid = GUID_random();
|
||||
r.in.req->req8.source_dsa_invocation_id = null_guid;
|
||||
r.in.req->req8.naming_context = &nc;
|
||||
r.in.req->req8.highwatermark.tmp_highest_usn = 0;
|
||||
r.in.req->req8.highwatermark.reserved_usn = 0;
|
||||
r.in.req->req8.highwatermark.highest_usn = 0;
|
||||
r.in.req->req8.uptodateness_vector = NULL;
|
||||
r.in.req->req8.replica_flags = 0;
|
||||
if (lp_parm_bool(tctx->lp_ctx, NULL, "drsuapi", "compression", false)) {
|
||||
r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
|
||||
r.in.req->req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
|
||||
}
|
||||
if (lp_parm_bool(tctx->lp_ctx, NULL, "drsuapi", "neighbour_writeable", true)) {
|
||||
r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
|
||||
r.in.req->req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
|
||||
}
|
||||
r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
|
||||
r.in.req->req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
|
||||
| DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS
|
||||
| DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS
|
||||
| DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED
|
||||
;
|
||||
r.in.req.req8.max_object_count = 402;
|
||||
r.in.req.req8.max_ndr_size = 402116;
|
||||
r.in.req.req8.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r.in.req.req8.fsmo_info = 0;
|
||||
r.in.req.req8.partial_attribute_set = NULL;
|
||||
r.in.req.req8.partial_attribute_set_ex = NULL;
|
||||
r.in.req.req8.mapping_ctr.num_mappings = 0;
|
||||
r.in.req.req8.mapping_ctr.mappings = NULL;
|
||||
r.in.req->req8.max_object_count = 402;
|
||||
r.in.req->req8.max_ndr_size = 402116;
|
||||
r.in.req->req8.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r.in.req->req8.fsmo_info = 0;
|
||||
r.in.req->req8.partial_attribute_set = NULL;
|
||||
r.in.req->req8.partial_attribute_set_ex = NULL;
|
||||
r.in.req->req8.mapping_ctr.num_mappings = 0;
|
||||
r.in.req->req8.mapping_ctr.mappings = NULL;
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -599,6 +599,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
|
||||
uint64_t highest_usn = 0;
|
||||
const char *partition = NULL;
|
||||
struct drsuapi_DsGetNCChanges r;
|
||||
union drsuapi_DsGetNCChangesRequest req;
|
||||
struct drsuapi_DsReplicaObjectIdentifier nc;
|
||||
struct drsuapi_DsGetNCChangesCtr1 *ctr1 = NULL;
|
||||
struct drsuapi_DsGetNCChangesCtr6 *ctr6 = NULL;
|
||||
@ -649,37 +650,38 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
|
||||
array[i].level);
|
||||
|
||||
r.in.bind_handle = &ctx->new_dc.drsuapi.bind_handle;
|
||||
r.in.level = &array[i].level;
|
||||
r.in.level = array[i].level;
|
||||
|
||||
switch (*r.in.level) {
|
||||
switch (r.in.level) {
|
||||
case 5:
|
||||
nc.guid = null_guid;
|
||||
nc.sid = null_sid;
|
||||
nc.dn = partition;
|
||||
|
||||
r.in.req.req5.destination_dsa_guid = ctx->new_dc.invocation_id;
|
||||
r.in.req.req5.source_dsa_invocation_id = null_guid;
|
||||
r.in.req.req5.naming_context = &nc;
|
||||
r.in.req.req5.highwatermark.tmp_highest_usn = highest_usn;
|
||||
r.in.req.req5.highwatermark.reserved_usn = 0;
|
||||
r.in.req.req5.highwatermark.highest_usn = highest_usn;
|
||||
r.in.req.req5.uptodateness_vector = NULL;
|
||||
r.in.req.req5.replica_flags = 0;
|
||||
r.in.req = &req;
|
||||
r.in.req->req5.destination_dsa_guid = ctx->new_dc.invocation_id;
|
||||
r.in.req->req5.source_dsa_invocation_id = null_guid;
|
||||
r.in.req->req5.naming_context = &nc;
|
||||
r.in.req->req5.highwatermark.tmp_highest_usn = highest_usn;
|
||||
r.in.req->req5.highwatermark.reserved_usn = 0;
|
||||
r.in.req->req5.highwatermark.highest_usn = highest_usn;
|
||||
r.in.req->req5.uptodateness_vector = NULL;
|
||||
r.in.req->req5.replica_flags = 0;
|
||||
if (lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "compression", false)) {
|
||||
r.in.req.req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
|
||||
r.in.req->req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
|
||||
}
|
||||
if (lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "neighbour_writeable", true)) {
|
||||
r.in.req.req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
|
||||
r.in.req->req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
|
||||
}
|
||||
r.in.req.req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
|
||||
r.in.req->req5.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
|
||||
| DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS
|
||||
| DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS
|
||||
| DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED
|
||||
;
|
||||
r.in.req.req5.max_object_count = 133;
|
||||
r.in.req.req5.max_ndr_size = 1336770;
|
||||
r.in.req.req5.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r.in.req.req5.fsmo_info = 0;
|
||||
r.in.req->req5.max_object_count = 133;
|
||||
r.in.req->req5.max_ndr_size = 1336770;
|
||||
r.in.req->req5.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r.in.req->req5.fsmo_info = 0;
|
||||
|
||||
break;
|
||||
case 8:
|
||||
@ -688,34 +690,35 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
|
||||
nc.dn = partition;
|
||||
/* nc.dn can be set to any other ad partition */
|
||||
|
||||
r.in.req.req8.destination_dsa_guid = ctx->new_dc.invocation_id;
|
||||
r.in.req.req8.source_dsa_invocation_id = null_guid;
|
||||
r.in.req.req8.naming_context = &nc;
|
||||
r.in.req.req8.highwatermark.tmp_highest_usn = highest_usn;
|
||||
r.in.req.req8.highwatermark.reserved_usn = 0;
|
||||
r.in.req.req8.highwatermark.highest_usn = highest_usn;
|
||||
r.in.req.req8.uptodateness_vector = NULL;
|
||||
r.in.req.req8.replica_flags = 0;
|
||||
r.in.req = &req;
|
||||
r.in.req->req8.destination_dsa_guid = ctx->new_dc.invocation_id;
|
||||
r.in.req->req8.source_dsa_invocation_id = null_guid;
|
||||
r.in.req->req8.naming_context = &nc;
|
||||
r.in.req->req8.highwatermark.tmp_highest_usn = highest_usn;
|
||||
r.in.req->req8.highwatermark.reserved_usn = 0;
|
||||
r.in.req->req8.highwatermark.highest_usn = highest_usn;
|
||||
r.in.req->req8.uptodateness_vector = NULL;
|
||||
r.in.req->req8.replica_flags = 0;
|
||||
if (lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "compression", false)) {
|
||||
r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
|
||||
r.in.req->req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
|
||||
}
|
||||
if (lp_parm_bool(tctx->lp_ctx, NULL, "dssync", "neighbour_writeable", true)) {
|
||||
r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
|
||||
r.in.req->req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
|
||||
}
|
||||
r.in.req.req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
|
||||
r.in.req->req8.replica_flags |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
|
||||
| DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS
|
||||
| DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS
|
||||
| DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED
|
||||
;
|
||||
r.in.req.req8.max_object_count = 402;
|
||||
r.in.req.req8.max_ndr_size = 402116;
|
||||
r.in.req->req8.max_object_count = 402;
|
||||
r.in.req->req8.max_ndr_size = 402116;
|
||||
|
||||
r.in.req.req8.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r.in.req.req8.fsmo_info = 0;
|
||||
r.in.req.req8.partial_attribute_set = NULL;
|
||||
r.in.req.req8.partial_attribute_set_ex = NULL;
|
||||
r.in.req.req8.mapping_ctr.num_mappings = 0;
|
||||
r.in.req.req8.mapping_ctr.mappings = NULL;
|
||||
r.in.req->req8.extended_op = DRSUAPI_EXOP_NONE;
|
||||
r.in.req->req8.fsmo_info = 0;
|
||||
r.in.req->req8.partial_attribute_set = NULL;
|
||||
r.in.req->req8.partial_attribute_set_ex = NULL;
|
||||
r.in.req->req8.mapping_ctr.num_mappings = 0;
|
||||
r.in.req->req8.mapping_ctr.mappings = NULL;
|
||||
|
||||
break;
|
||||
}
|
||||
@ -723,19 +726,23 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
|
||||
printf("Dumping AD partition: %s\n", nc.dn);
|
||||
for (y=0; ;y++) {
|
||||
int32_t _level = 0;
|
||||
ZERO_STRUCT(r.out);
|
||||
r.out.level = &_level;
|
||||
union drsuapi_DsGetNCChangesCtr ctr;
|
||||
|
||||
if (*r.in.level == 5) {
|
||||
ZERO_STRUCT(r.out);
|
||||
|
||||
r.out.level_out = &_level;
|
||||
r.out.ctr = &ctr;
|
||||
|
||||
if (r.in.level == 5) {
|
||||
DEBUG(0,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
|
||||
(long long)r.in.req.req5.highwatermark.tmp_highest_usn,
|
||||
(long long)r.in.req.req5.highwatermark.highest_usn));
|
||||
(long long)r.in.req->req5.highwatermark.tmp_highest_usn,
|
||||
(long long)r.in.req->req5.highwatermark.highest_usn));
|
||||
}
|
||||
|
||||
if (*r.in.level == 8) {
|
||||
if (r.in.level == 8) {
|
||||
DEBUG(0,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
|
||||
(long long)r.in.req.req8.highwatermark.tmp_highest_usn,
|
||||
(long long)r.in.req.req8.highwatermark.highest_usn));
|
||||
(long long)r.in.req->req8.highwatermark.tmp_highest_usn,
|
||||
(long long)r.in.req->req8.highwatermark.highest_usn));
|
||||
}
|
||||
|
||||
status = dcerpc_drsuapi_DsGetNCChanges(ctx->new_dc.drsuapi.pipe, ctx, &r);
|
||||
@ -751,13 +758,13 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
|
||||
ret = false;
|
||||
}
|
||||
|
||||
if (ret == true && *r.out.level == 1) {
|
||||
if (ret == true && *r.out.level_out == 1) {
|
||||
out_level = 1;
|
||||
ctr1 = &r.out.ctr.ctr1;
|
||||
} else if (ret == true && *r.out.level == 2 &&
|
||||
r.out.ctr.ctr2.mszip1.ts) {
|
||||
ctr1 = &r.out.ctr->ctr1;
|
||||
} else if (ret == true && *r.out.level_out == 2 &&
|
||||
r.out.ctr->ctr2.mszip1.ts) {
|
||||
out_level = 1;
|
||||
ctr1 = &r.out.ctr.ctr2.mszip1.ts->ctr1;
|
||||
ctr1 = &r.out.ctr->ctr2.mszip1.ts->ctr1;
|
||||
}
|
||||
|
||||
if (out_level == 1) {
|
||||
@ -768,26 +775,26 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
|
||||
test_analyse_objects(tctx, ctx, &gensec_skey, ctr1->first_object);
|
||||
|
||||
if (ctr1->more_data) {
|
||||
r.in.req.req5.highwatermark = ctr1->new_highwatermark;
|
||||
r.in.req->req5.highwatermark = ctr1->new_highwatermark;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == true && *r.out.level == 6) {
|
||||
if (ret == true && *r.out.level_out == 6) {
|
||||
out_level = 6;
|
||||
ctr6 = &r.out.ctr.ctr6;
|
||||
} else if (ret == true && *r.out.level == 7
|
||||
&& r.out.ctr.ctr7.level == 6
|
||||
&& r.out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP
|
||||
&& r.out.ctr.ctr7.ctr.mszip6.ts) {
|
||||
ctr6 = &r.out.ctr->ctr6;
|
||||
} else if (ret == true && *r.out.level_out == 7
|
||||
&& r.out.ctr->ctr7.level == 6
|
||||
&& r.out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP
|
||||
&& r.out.ctr->ctr7.ctr.mszip6.ts) {
|
||||
out_level = 6;
|
||||
ctr6 = &r.out.ctr.ctr7.ctr.mszip6.ts->ctr6;
|
||||
} else if (ret == true && *r.out.level == 7
|
||||
&& r.out.ctr.ctr7.level == 6
|
||||
&& r.out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS
|
||||
&& r.out.ctr.ctr7.ctr.xpress6.ts) {
|
||||
ctr6 = &r.out.ctr->ctr7.ctr.mszip6.ts->ctr6;
|
||||
} else if (ret == true && *r.out.level_out == 7
|
||||
&& r.out.ctr->ctr7.level == 6
|
||||
&& r.out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS
|
||||
&& r.out.ctr->ctr7.ctr.xpress6.ts) {
|
||||
out_level = 6;
|
||||
ctr6 = &r.out.ctr.ctr7.ctr.xpress6.ts->ctr6;
|
||||
ctr6 = &r.out.ctr->ctr7.ctr.xpress6.ts->ctr6;
|
||||
}
|
||||
|
||||
if (out_level == 6) {
|
||||
@ -798,7 +805,7 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx)
|
||||
test_analyse_objects(tctx, ctx, &gensec_skey, ctr6->first_object);
|
||||
|
||||
if (ctr6->more_data) {
|
||||
r.in.req.req8.highwatermark = ctr6->new_highwatermark;
|
||||
r.in.req->req8.highwatermark = ctr6->new_highwatermark;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user