summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorTim Beale <timbeale@catalyst.net.nz>2018-11-12 11:21:36 +1300
committerTim Beale <timbeale@samba.org>2018-11-21 01:51:11 +0100
commit19a36b367f1a33f1eb65e0c5164a3209fcef16e6 (patch)
tree6bfb2315904e5d1bc2f8d7a65ba3ad69d11f2466 /source4
parentf53954d0fd4d67c73336e9fda81429df9c55d77a (diff)
downloadsamba-19a36b367f1a33f1eb65e0c5164a3209fcef16e6.tar.gz
replmd: Remove some redundant code
At first glance, this code seemed completely unnecessary. However, it was added (by commit f6bc4c08b19f5615) for a valid reason: adding the whenChanged/uSNChanged attributes to the message can cause msg->elements to be reallocated, which means the old_el pointer (which points to msg->elements memory) can be out of date. whenChanged/uSNChanged now get added to the msg last, just before the DB modify operation. So old_el can no longer become out of date within replmd_process_link_attribute(), so re-fetching it is now redundant. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 88c5b6c9c4f..bcb74f4ebbb 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -8141,11 +8141,6 @@ static int replmd_process_linked_attribute(struct ldb_module *module,
}
}
- old_el = ldb_msg_find_element(msg, attr->lDAPDisplayName);
- if (old_el == NULL) {
- return ldb_operr(ldb);
- }
-
ret = dsdb_check_single_valued_link(attr, old_el);
if (ret != LDB_SUCCESS) {
return ret;