1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

dsdb: Apply linked attribute backlinks as we apply the forward links

Otherwise, we spend a lot of time checking if the link is in the list, which is pointless
and very costly in large domains

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2016-06-16 09:31:21 +12:00
parent 4fb23630ba
commit 5fe2607693

View File

@ -6075,7 +6075,7 @@ linked_attributes[0]:
if (!(rmd_flags & DSDB_RMD_FLAG_DELETED)) {
/* remove the existing backlink */
ret = replmd_add_backlink(module, schema, &la->identifier->guid, &guid, false, attr, false);
ret = replmd_add_backlink(module, schema, &la->identifier->guid, &guid, false, attr, true);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;
@ -6095,7 +6095,7 @@ linked_attributes[0]:
if (active) {
/* add the new backlink */
ret = replmd_add_backlink(module, schema, &la->identifier->guid, &guid, true, attr, false);
ret = replmd_add_backlink(module, schema, &la->identifier->guid, &guid, true, attr, true);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;
@ -6130,7 +6130,7 @@ linked_attributes[0]:
if (active) {
ret = replmd_add_backlink(module, schema, &la->identifier->guid, &guid,
true, attr, false);
true, attr, true);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;