s4-dsdb: Add better debugging to dsdb_objects_have_same_nc()
authorAndrew Bartlett <abartlet@samba.org>
Thu, 15 Dec 2022 05:52:20 +0000 (18:52 +1300)
committerJule Anger <janger@samba.org>
Wed, 1 Feb 2023 16:30:11 +0000 (16:30 +0000)
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>
(cherry picked from commit 0f501b2316af6568003e520848c1ec80c286fd36)

source4/dsdb/common/util.c

index 0daea8a5c03a7d3d6b65d745a1a4b11b6721d722..da6fb3c2d9b2d959ea4b174a16074ae0478c33f8 100644 (file)
@@ -6063,8 +6063,8 @@ bool dsdb_objects_have_same_nc(struct ldb_context *ldb,
                ret = LDB_ERR_OTHER;
        }
        if (ret != LDB_SUCCESS) {
-               DBG_ERR("Failed to find base DN for source %s\n",
-                       ldb_dn_get_linearized(source_dn));
+               DBG_ERR("Failed to find base DN for source %s: %s\n",
+                       ldb_dn_get_linearized(source_dn), ldb_errstring(ldb));
                talloc_free(tmp_ctx);
                return true;
        }
@@ -6075,8 +6075,8 @@ bool dsdb_objects_have_same_nc(struct ldb_context *ldb,
                ret = LDB_ERR_OTHER;
        }
        if (ret != LDB_SUCCESS) {
-               DBG_ERR("Failed to find base DN for target %s\n",
-                       ldb_dn_get_linearized(target_dn));
+               DBG_ERR("Failed to find base DN for target %s: %s\n",
+                       ldb_dn_get_linearized(target_dn), ldb_errstring(ldb));
                talloc_free(tmp_ctx);
                return true;
        }