s4-dsdb: Schedule SD propegation only after successful rename
commit24adeb3ad11c693aefbbea25570527cc87cd977d
authorAndrew Bartlett <abartlet@samba.org>
Wed, 25 Jan 2023 20:44:01 +0000 (26 09:44 +1300)
committerJule Anger <janger@samba.org>
Fri, 3 Feb 2023 09:35:08 +0000 (3 09:35 +0000)
treef3390f8e372248c9321d30902b35262cf5105e02
parentfedd276dbf1f792fe27eed6165b21aea4764718d
s4-dsdb: Schedule SD propegation only after successful rename

This avoids needing to anticipate errors that the rename might give
while allowing the dsdb_find_nc_root() routine to become stricter.

The problem is that dsdb_find_nc_root() will soon do a real search and
so fail more often, but these failures will give "wrong" error codes.

We do not need to do this work if the operation fails, so put this in
the callback.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 7032b86cd5c1456318558ed95f8890e353117ced)
source4/dsdb/samdb/ldb_modules/descriptor.c