summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/drs/rpc/msds_intid.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/source4/torture/drs/rpc/msds_intid.c b/source4/torture/drs/rpc/msds_intid.c
index 6fded004ce..2b2fa5e10d 100644
--- a/source4/torture/drs/rpc/msds_intid.c
+++ b/source4/torture/drs/rpc/msds_intid.c
@@ -489,6 +489,7 @@ static bool test_dsintid_schema(struct torture_context *tctx, struct DsIntIdTest
const struct drsuapi_DsReplicaAttribute *drs_attr;
const struct drsuapi_DsReplicaAttributeCtr *attr_ctr;
const struct drsuapi_DsReplicaObjectListItemEx *cur;
+ const struct drsuapi_DsReplicaLinkedAttribute *la;
TALLOC_CTX *mem_ctx;
mem_ctx = talloc_new(ctx);
@@ -531,6 +532,27 @@ static bool test_dsintid_schema(struct torture_context *tctx, struct DsIntIdTest
}
}
+ /* verify ATTIDs for Linked Attributes */
+ torture_comment(tctx, "Verify ATTIDs for Linked Attributes (%u)\n",
+ ctr6->linked_attributes_count);
+ for (i = 0; i < ctr6->linked_attributes_count; i++) {
+ la = &ctr6->linked_attributes[i];
+ dsdb_attr = dsdb_attribute_by_attributeID_id(ldap_schema, la->attid);
+
+ torture_assert(tctx,
+ la->attid == dsdb_attr->attributeID_id,
+ _make_error_message(ctx, la->attid,
+ dsdb_attr,
+ la->identifier))
+ if (dsdb_attr->msDS_IntId) {
+ torture_assert(tctx,
+ drs_attr->attid != dsdb_attr->msDS_IntId,
+ _make_error_message(ctx, la->attid,
+ dsdb_attr,
+ la->identifier))
+ }
+ }
+
talloc_free(mem_ctx);
return true;
@@ -551,6 +573,7 @@ static bool test_dsintid_domain(struct torture_context *tctx, struct DsIntIdTest
const struct drsuapi_DsReplicaAttribute *drs_attr;
const struct drsuapi_DsReplicaAttributeCtr *attr_ctr;
const struct drsuapi_DsReplicaObjectListItemEx *cur;
+ const struct drsuapi_DsReplicaLinkedAttribute *la;
TALLOC_CTX *mem_ctx;
mem_ctx = talloc_new(ctx);
@@ -593,6 +616,28 @@ static bool test_dsintid_domain(struct torture_context *tctx, struct DsIntIdTest
}
}
+ /* verify ATTIDs for Linked Attributes */
+ torture_comment(tctx, "Verify ATTIDs for Linked Attributes (%u)\n",
+ ctr6->linked_attributes_count);
+ for (i = 0; i < ctr6->linked_attributes_count; i++) {
+ la = &ctr6->linked_attributes[i];
+ dsdb_attr = dsdb_attribute_by_attributeID_id(ldap_schema, la->attid);
+
+ if (dsdb_attr->msDS_IntId) {
+ torture_assert(tctx,
+ la->attid == dsdb_attr->msDS_IntId,
+ _make_error_message(ctx, la->attid,
+ dsdb_attr,
+ la->identifier));
+ } else {
+ torture_assert(tctx,
+ la->attid == dsdb_attr->attributeID_id,
+ _make_error_message(ctx, la->attid,
+ dsdb_attr,
+ la->identifier));
+ }
+ }
+
talloc_free(mem_ctx);
return true;