summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-11-14 03:52:39 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:45:13 +0100
commitb34f286d3a0367acf18288e43323c4f88b11378d (patch)
tree22c80d32f364ad0e01dddba9671cc95107687339
parent58f9b5702a432a39a8276367532635300034d180 (diff)
downloadsamba-b34f286d3a0367acf18288e43323c4f88b11378d.tar.gz
samba-b34f286d3a0367acf18288e43323c4f88b11378d.tar.bz2
samba-b34f286d3a0367acf18288e43323c4f88b11378d.zip
r25949: Make error messages clearer and more correct.
Andrew Bartlett (This used to be commit f0a0d73f768434cb474b311d7c366d1f2a06c8f4)
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c4
-rw-r--r--source4/dsdb/samdb/samdb.c9
2 files changed, 7 insertions, 6 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index e2e914ee82..b1366fd994 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -475,7 +475,7 @@ static int samldb_fill_user_or_computer_object(struct ldb_module *module, const
/* build the new msg */
msg2 = ldb_msg_copy(mem_ctx, msg);
if (!msg2) {
- ldb_debug(module->ldb, LDB_DEBUG_FATAL, "samldb_fill_group_object: ldb_msg_copy failed!\n");
+ ldb_debug(module->ldb, LDB_DEBUG_FATAL, "samldb_fill_user_or_computer_object: ldb_msg_copy failed!\n");
talloc_free(mem_ctx);
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -523,7 +523,7 @@ static int samldb_fill_user_or_computer_object(struct ldb_module *module, const
ret = samdb_search_for_parent_domain(module->ldb, mem_ctx, msg2->dn, &dom_dn, &errstr);
if (ret != LDB_SUCCESS) {
ldb_asprintf_errstring(module->ldb,
- "samldb_fill_group_object: %s", errstr);
+ "samldb_fill_user_or_computer_object: %s", errstr);
return ret;
}
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index 96e526d319..8b1c00dc90 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -1521,15 +1521,16 @@ int samdb_search_for_parent_domain(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
}
if (ret != LDB_SUCCESS) {
- *errstring = talloc_asprintf(mem_ctx, "Error searching for parent domain of %s: %s",
- ldb_dn_get_linearized(sdn),
- ldb_errstring(ldb));
+ *errstring = talloc_asprintf(mem_ctx, "Error searching for parent domain of %s, failed searching for %s: %s",
+ ldb_dn_get_linearized(dn),
+ ldb_dn_get_linearized(sdn),
+ ldb_errstring(ldb));
talloc_free(local_ctx);
return ret;
}
if (res->count != 1) {
*errstring = talloc_asprintf(mem_ctx, "Invalid dn (%s), not child of a domain object",
- ldb_dn_get_linearized(sdn));
+ ldb_dn_get_linearized(dn));
talloc_free(local_ctx);
return LDB_ERR_CONSTRAINT_VIOLATION;
}