diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-10-09 05:40:32 +0300 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2010-10-09 03:43:34 +0000 |
commit | 2d2dbf53ee110bfcd2f193d3e5c8d0e27759c4f3 (patch) | |
tree | 7fa8a88a2607620771d77706a526456729b59869 /source4/torture/drs/rpc | |
parent | 6853883f3f171c69b28a0888548aaa464e163ac7 (diff) | |
download | samba-2d2dbf53ee110bfcd2f193d3e5c8d0e27759c4f3.tar.gz samba-2d2dbf53ee110bfcd2f193d3e5c8d0e27759c4f3.tar.bz2 samba-2d2dbf53ee110bfcd2f193d3e5c8d0e27759c4f3.zip |
s4-test-msds_intid: Verify ATTIDs for Linked Attributes
Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Sat Oct 9 03:43:34 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4/torture/drs/rpc')
-rw-r--r-- | source4/torture/drs/rpc/msds_intid.c | 45 |
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; |