summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-17 23:50:41 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 08:16:50 +1100
commite4a6f5c8b8de0429578cd09913f1d41d0a1fd82f (patch)
tree0f868266616c75af55e4da4922fe28501cab124a /source4/dsdb/samdb
parent5eefff915e0c49cbdbecd764b8e0a2cc15d10d93 (diff)
downloadsamba-e4a6f5c8b8de0429578cd09913f1d41d0a1fd82f.tar.gz
samba-e4a6f5c8b8de0429578cd09913f1d41d0a1fd82f.tar.bz2
samba-e4a6f5c8b8de0429578cd09913f1d41d0a1fd82f.zip
s4-dsdb: handle links with no backlinks in replmd_delete
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 689b24f398..e184181f01 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -2038,10 +2038,9 @@ static int replmd_delete_remove_link(struct ldb_module *module,
msg->dn = dsdb_dn->dn;
- if (sa->linkID & 1) {
- target_attr = dsdb_attribute_by_linkID(schema, sa->linkID - 1);
- } else {
- target_attr = dsdb_attribute_by_linkID(schema, sa->linkID + 1);
+ target_attr = dsdb_attribute_by_linkID(schema, sa->linkID ^ 1);
+ if (target_attr == NULL) {
+ continue;
}
ret = ldb_msg_add_empty(msg, target_attr->lDAPDisplayName, LDB_FLAG_MOD_DELETE, &el2);