dsdb: Improve debug messages in operational module
authorAndrew Bartlett <abartlet@samba.org>
Sun, 20 Mar 2016 22:29:04 +0000 (11:29 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 9 May 2016 23:43:14 +0000 (01:43 +0200)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source4/dsdb/samdb/ldb_modules/operational.c

index c5fd8e27887f231d1ef3ff8f7c79c1d1479cb1a4..0dd420ada05624ea6a2ac37195a0db2323af9a43 100644 (file)
@@ -362,7 +362,8 @@ static int construct_parent_guid(struct ldb_module *module,
        /* not NC, so the object should have a parent*/
        if (ret == LDB_ERR_NO_SUCH_OBJECT) {
                return ldb_error(ldb_module_get_ctx(module), LDB_ERR_OPERATIONS_ERROR, 
-                                talloc_asprintf(msg, "Parent dn for %s does not exist", 
+                                talloc_asprintf(msg, "Parent dn %s for %s does not exist",
+                                                ldb_dn_get_linearized(parent_dn),
                                                 ldb_dn_get_linearized(msg->dn)));
        } else if (ret != LDB_SUCCESS) {
                return ret;
@@ -1037,7 +1038,7 @@ static int operational_search_post_process(struct ldb_module *module,
 failed:
        ldb_debug_set(ldb, LDB_DEBUG_WARNING,
                      "operational_search_post_process failed for attribute '%s' - %s",
-                     attrs_from_user[a], ldb_errstring(ldb));
+                     list_replace[a].attr, ldb_errstring(ldb));
        return -1;
 }