diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-06-07 10:44:48 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-06-07 12:55:37 +1000 |
commit | 5d7ba305490b5047b4d404353e95c217c8ef7d10 (patch) | |
tree | 653e65b59920ba0ad8442ef93ef4463377386264 /source4/dsdb/samdb | |
parent | c6252c2e9d9c43496f1b5ecbf66099979096f66e (diff) | |
download | samba-5d7ba305490b5047b4d404353e95c217c8ef7d10.tar.gz samba-5d7ba305490b5047b4d404353e95c217c8ef7d10.tar.bz2 samba-5d7ba305490b5047b4d404353e95c217c8ef7d10.zip |
s4-dsdb: cope with missing backlinks in rpmd handling
if backlinks have not propogated correctly in a previous replication
this allows us to recover
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 90933c4c79..04311a4a98 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -254,7 +254,16 @@ static int replmd_process_backlink(struct ldb_module *module, struct la_backlink msg->elements[0].flags |= LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK; ret = dsdb_module_modify(module, msg, DSDB_FLAG_NEXT_MODULE, parent); - if (ret != LDB_SUCCESS) { + if (ret == LDB_ERR_NO_SUCH_ATTRIBUTE && !bl->active) { + /* we allow LDB_ERR_NO_SUCH_ATTRIBUTE as success to + cope with possible corruption where the backlink has + already been removed */ + DEBUG(0,("WARNING: backlink from %s already removed from %s - %s\n", + ldb_dn_get_linearized(target_dn), + ldb_dn_get_linearized(source_dn), + ldb_errstring(ldb))); + ret = LDB_SUCCESS; + } else if (ret != LDB_SUCCESS) { ldb_asprintf_errstring(ldb, "Failed to %s backlink from %s to %s - %s", bl->active?"add":"remove", ldb_dn_get_linearized(source_dn), |