s4-dsdb: allow deletion of backlinks if DSDB_CONTROL_DBCHECK given
[metze/samba/wip.git] / source4 / dsdb / samdb / ldb_modules / repl_meta_data.c
index fff542abca108f65c39a05f102b711a2b653896f..2be0760d14a65ce4c0d11b0120991f267678429d 100644 (file)
@@ -2179,6 +2179,9 @@ static int replmd_modify_handle_linked_attribs(struct ldb_module *module,
                        continue;
                }
                if ((schema_attr->linkID & 1) == 1) {
+                       if (parent && ldb_request_get_control(parent, DSDB_CONTROL_DBCHECK)) {
+                               continue;
+                       }
                        /* Odd is for the target.  Illegal to modify */
                        ldb_asprintf_errstring(ldb,
                                               "attribute %s must not be modified directly, it is a linked attribute", el->name);