s4-dsdb: Schedule SD propegation only after successful rename
authorAndrew Bartlett <abartlet@samba.org>
Wed, 25 Jan 2023 20:44:01 +0000 (09:44 +1300)
committerStefan Metzmacher <metze@samba.org>
Tue, 31 Jan 2023 12:50:33 +0000 (12:50 +0000)
commit7032b86cd5c1456318558ed95f8890e353117ced
treecf01b615aaec5704fcb76a574454711c8e396bc7
parent7c43388576f768db564aaf15a47d3f9ce5796fb3
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>
source4/dsdb/samdb/ldb_modules/descriptor.c