dsdb: Avoid ERROR(ldb): uncaught exception - Deleted target CN=NTDS Settings... in...
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Mar 2023 07:25:06 +0000 (20:25 +1300)
committerJule Anger <janger@samba.org>
Thu, 30 Mar 2023 16:10:35 +0000 (16:10 +0000)
commite2df45934ab415732f7f0377601774119b37e7b3
tree8b47ce1da4bd7527e0dfadec88013be4c3f06f05
parenteaff4ef61624276b16dc0dcb11868e2778d2e46f
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>
(cherry picked from commit bfc33b47bb428233e100f75e7a725ac52179f823)

Autobuild-User(v4-17-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-17-test): Thu Mar 30 16:10:35 UTC 2023 on sn-devel-184
python/samba/join.py
selftest/knownfail.d/replicate_against_deleted [deleted file]
source4/dsdb/samdb/ldb_modules/repl_meta_data.c