s4-dsdb Don't process deletion of member attributes here.
authorAndrew Bartlett <abartlet@samba.org>
Wed, 13 Jul 2011 05:31:19 +0000 (15:31 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 13 Jul 2011 10:51:05 +0000 (12:51 +0200)
We don't need to compare the delete against the primaryGroupID check
here - that test is for adds.

Andrew Bartlett

source4/dsdb/samdb/ldb_modules/samldb.c

index 0fe13e53cf8c631eddb7b6ab073aed973f1b9bef..5f17e3bd6f687159ec771b1f0d33936cf947e15e 100644 (file)
@@ -1599,6 +1599,15 @@ static int samldb_member_check(struct samldb_ctx *ac)
                        const char *group_attrs[] = { "primaryGroupID" , NULL };
                        uint32_t prim_group_rid;
 
+                       if (LDB_FLAG_MOD_TYPE(el->flags) == LDB_FLAG_MOD_DELETE) {
+                               /* Deletes will be handled in
+                                * repl_meta_data, and deletes not
+                                * matching a member will return
+                                * LDB_ERR_UNWILLING_TO_PERFORM
+                                * there */
+                               continue;
+                       }
+
                        member_dn = ldb_dn_from_ldb_val(ac, ldb,
                                                        &el->values[j]);
                        if (!ldb_dn_validate(member_dn)) {