From 15b42d6515504862184f33ad8002135ec1e63158 Mon Sep 17 00:00:00 2001 From: Nadezhda Ivanova Date: Mon, 3 May 2010 14:50:10 +0200 Subject: Added a function to check if an attribute can belong to a filtered replica. --- source4/torture/ldap/schema.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source4/torture/ldap') diff --git a/source4/torture/ldap/schema.c b/source4/torture/ldap/schema.c index c9423409a8..af33de9d0a 100644 --- a/source4/torture/ldap/schema.c +++ b/source4/torture/ldap/schema.c @@ -356,6 +356,22 @@ static bool test_dump_sorted_syntax(struct ldb_context *ldb, struct test_rootDSE return true; } +static bool test_dump_not_in_filtered_replica(struct ldb_context *ldb, struct test_rootDSE *root, struct dsdb_schema *schema) +{ + struct dsdb_attribute *a; + uint32_t a_i = 1; + + d_printf("Dumping attributes not in filtered replica\n"); + + for (a=schema->attributes; a; a = a->next) { + if (!dsdb_attribute_is_attr_in_filtered_replica(a)) { + d_printf("attr[%4u]: '%s'\n", a_i++, + a->lDAPDisplayName); + } + } + return true; +} + bool torture_ldap_schema(struct torture_context *torture) { struct ldb_context *ldb; @@ -384,6 +400,7 @@ bool torture_ldap_schema(struct torture_context *torture) ret &= test_dump_partial(ldb, &rootDSE, schema); ret &= test_dump_contructed(ldb, &rootDSE, schema); ret &= test_dump_sorted_syntax(ldb, &rootDSE, schema); + ret &= test_dump_not_in_filtered_replica(ldb, &rootDSE, schema); failed: return ret; -- cgit