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>
Fri, 3 Feb 2023 09:35:08 +0000 (09:35 +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 97444fc1d3eabd133354cea098ae3efb90c6d0b6..58eef3abb668d0f204c98c356b9924c894485a0e 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;
        }