From 251e3cd8c8d5a0435344caf55a6d627ecc201e31 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 27 Jun 2023 12:18:24 +1200 Subject: [PATCH] s4-rpc_server/drsuapi: Improve debugging of invalid DNs This is still unreachable, so but improve the logging to give more detail in this area anyway. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15401 Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher (cherry picked from commit d0c1ce53add2fd3b3a4186581f4e214029cbcf1a) --- source4/rpc_server/drsuapi/getncchanges.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c index 9eb75c8502a..d730a1d18f5 100644 --- a/source4/rpc_server/drsuapi/getncchanges.c +++ b/source4/rpc_server/drsuapi/getncchanges.c @@ -2977,8 +2977,9 @@ allowed: * This can't fail as we have done this above * implicitly but not got the DN out */ - DBG_ERR("Bad DN '%s'\n", - drs_ObjectIdentifier_to_debug_string(mem_ctx, ncRoot)); + DBG_ERR("Bad DN '%s' as Naming Context for GetNCChanges: %s\n", + drs_ObjectIdentifier_to_debug_string(mem_ctx, ncRoot), + ldb_strerror(ret)); return WERR_DS_DRA_INVALID_PARAMETER; } if (ldb_dn_compare(new_dn, getnc_state->ncRoot_dn) != 0) {