s4 ldb modules: relax some tests about attributes that should not be here
authorMatthieu Patou <mat@matws.net>
Sat, 10 Jul 2010 10:48:40 +0000 (14:48 +0400)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 15 Jul 2010 12:08:21 +0000 (22:08 +1000)
For attributes that we know that are harmless and that used to be stored
in the ldb we relax the tests on the existance in a given objectclass.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/objectclass_attrs.c

index 6cfecc0d72d751b97aac5d08b6d92b3c1cfec6b1..b9436e3a04955cc0bbf68d6add6abccadc3762a9 100644 (file)
@@ -153,6 +153,12 @@ static int attr_handler(struct oc_context *ac)
        return ldb_next_request(ac->module, child_req);
 }
 
+/*
+  these are attributes which are left over from old ways of doing
+  things in ldb, and are harmless
+ */
+static const char *harmless_attrs[] = { "parentGUID", NULL };
+
 static int attr_handler2(struct oc_context *ac)
 {
        struct ldb_context *ldb;
@@ -218,6 +224,9 @@ static int attr_handler2(struct oc_context *ac)
                } else {
                        found = str_list_check(may_contain, attr->lDAPDisplayName);
                }
+               if (!found) {
+                       found = str_list_check(harmless_attrs, attr->lDAPDisplayName);
+               }
                if (!found) {
                        ldb_asprintf_errstring(ldb, "objectclass_attrs: attribute '%s' on entry '%s' does not exist in the specified objectclasses!",
                                               msg->elements[i].name,