s4-drs: don't try to remove backlinks directly
authorAndrew Tridgell <tridge@samba.org>
Mon, 21 Dec 2009 10:28:04 +0000 (21:28 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 1 Jan 2010 21:16:53 +0000 (08:16 +1100)
backlinks need to be removed as a side effect of removing the forward
link

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index 9994b9566dfa6f227072ddbe7c568f813ad0d2e2..5bf43857cc0213b520fb57ac59ef0b02468e6a9e 100644 (file)
@@ -2327,12 +2327,13 @@ static int replmd_delete(struct ldb_module *module, struct ldb_request *req)
                        continue;
                }
 
-               if (sa->linkID) {
+               if (sa->linkID && sa->linkID & 1) {
                        ret = replmd_delete_remove_link(module, schema, old_dn, el, sa);
                        if (ret != LDB_SUCCESS) {
                                talloc_free(tmp_ctx);
                                return LDB_ERR_OPERATIONS_ERROR;
                        }
+                       continue;
                }
 
                if (!sa->linkID && ldb_attr_in_list(preserved_attrs, el->name)) {