]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:dsdb: Permit forward link to be missing in linked_attributes_fix_forward_link()
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Sun, 8 Oct 2023 22:55:10 +0000 (11:55 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 13 Oct 2023 02:18:31 +0000 (02:18 +0000)
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 <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/linked_attributes.c

index 312d818ab687d0f60da32d671d7ade6b0ea9ca32..f05223ee8ebd5319807cc4c8e87d7943579cdae3 100644 (file)
@@ -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;