summaryrefslogtreecommitdiff
path: root/source4/torture/ldap
diff options
context:
space:
mode:
authorNadezhda Ivanova <nivanova@samba.org>2010-05-03 14:50:10 +0200
committerNadezhda Ivanova <nivanova@samba.org>2010-05-03 14:50:10 +0200
commit15b42d6515504862184f33ad8002135ec1e63158 (patch)
tree15712b1627662cac4773a47baba3ef01b3c9337f /source4/torture/ldap
parentfe1617a818b13b2ff2289e3afd33f2ddcfa76124 (diff)
downloadsamba-15b42d6515504862184f33ad8002135ec1e63158.tar.gz
samba-15b42d6515504862184f33ad8002135ec1e63158.tar.bz2
samba-15b42d6515504862184f33ad8002135ec1e63158.zip
Added a function to check if an attribute can belong to a filtered replica.
Diffstat (limited to 'source4/torture/ldap')
-rw-r--r--source4/torture/ldap/schema.c17
1 files changed, 17 insertions, 0 deletions
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;