From: Joseph Sutton Date: Sun, 8 Oct 2023 22:55:10 +0000 (+1300) Subject: s4:dsdb: Permit forward link to be missing in linked_attributes_fix_forward_link() X-Git-Tag: tevent-0.16.0~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=61037a85bf8bf953fc83d258e61e11d561b498db;p=thirdparty%2Fsamba.git s4:dsdb: Permit forward link to be missing in linked_attributes_fix_forward_link() We don’t care if a forward link is missing from an object being renamed during the deletion process. Nothing yet checks the value returned from this function, so there should be no change in behaviour. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c index 312d818ab68..f05223ee8eb 100644 --- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c +++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c @@ -842,13 +842,15 @@ static int linked_attributes_fix_forward_link(struct ldb_module *module, } if (exact == NULL) { - ldb_asprintf_errstring( - ldb, - "parsed_dn_find could not find %s link for %s", - el->name, - ldb_dn_get_linearized(msg->dn)); + /* + * Our only caller doesn’t want to know about errors finding a + * forward link for which we have a backlink — in particular, + * during the tombstoning of an object, the forward links have + * already been removed when this routine is called by + * dsdb_module_rename() inside replmd_delete_internals(). + */ talloc_free(tmp_ctx); - return LDB_ERR_OPERATIONS_ERROR; + return LDB_SUCCESS; } is_plain_dn = strcmp(syntax_oid, LDB_SYNTAX_DN) == 0;