dsdb: Avoid ERROR(ldb): uncaught exception - Deleted target CN=NTDS Settings... in...
commitbfc33b47bb428233e100f75e7a725ac52179f823
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Mar 2023 07:25:06 +0000 (9 20:25 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 14 Mar 2023 06:16:30 +0000 (14 06:16 +0000)
tree90454be17a422c063972d037b799deeb214251d3
parent2d41bcce83a976b85636c92d6fc38c63fdde5431
dsdb: Avoid ERROR(ldb): uncaught exception - Deleted target CN=NTDS Settings... in join

"samba-tool domain join" uses the replication API in a strange way, perhaps no longer
required, except that we often still have folks upgrading from very old Samba versions.

When deferring the writing out to the DB of link replication to the very end, there
is a greater opportunity for the deletion of an object to have been sent with the
other objects, and have the link applied later.

This tells the repl_meta_data code to behave as if GET_TGT had been sent at the
time the link was returned, allowing a link to a deleted object to be silently
discarded.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15329

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
python/samba/join.py
selftest/knownfail.d/replicate_against_deleted [deleted file]
source4/dsdb/samdb/ldb_modules/repl_meta_data.c