1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-21 18:04:06 +03:00

s4-rpc_server/drsuapi: Ensure logs show DN for replicated objects, not (null)

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 17359afa627a3086ec8d6862f007a3479574a8b4)
This commit is contained in:
Andrew Bartlett 2023-06-28 15:57:47 +12:00 committed by Jule Anger
parent ee8dafa103
commit 4ae4d2ac3b

View File

@ -3567,7 +3567,15 @@ allowed:
getncchanges_chunk_add_objects(repl_chunk, new_objs);
talloc_free(getnc_state->last_dn);
getnc_state->last_dn = talloc_move(getnc_state, &msg->dn);
/*
* talloc_steal() as we still need msg->dn to
* be a valid pointer for the log on the next
* line.
*
* msg only remains in scope for the next 25
* lines or so anyway.
*/
getnc_state->last_dn = talloc_steal(getnc_state, msg->dn);
}
DEBUG(8,(__location__ ": %s object %s new tmp_highest_usn=%" PRIu64 "\n",