summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-09-03 07:56:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:03:38 -0500
commit6a92d816a7dc97b8ca8a1b2419c31515add5ac87 (patch)
treea87d6453993f131fe60924cca8bb649a8beee883 /source4/dsdb/samdb
parentb93a941214b82448a15c3d936bb21dcda2a5287e (diff)
downloadsamba-6a92d816a7dc97b8ca8a1b2419c31515add5ac87.tar.gz
samba-6a92d816a7dc97b8ca8a1b2419c31515add5ac87.tar.bz2
samba-6a92d816a7dc97b8ca8a1b2419c31515add5ac87.zip
r24918: Fix the build (forgot to include dcesrv_lsa.c in the previous commit)
and improve error strings returned from samdb.c Andrew Bartlett (This used to be commit a42d0eb531e663304bea840d614b2f91f95dd818)
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/samdb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index 18669a2ae7..17c40dd30d 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -691,6 +691,8 @@ int samdb_copy_template(struct ldb_context *ldb,
*errstring = NULL;
if (!ldb_dn_add_child_fmt(basedn, "CN=Template%s", name)) {
+ *errstring = talloc_asprintf(msg, "samdb_copy_template: ERROR: Failed to contruct DN for template '%s'",
+ name);
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -702,7 +704,7 @@ int samdb_copy_template(struct ldb_context *ldb,
return ret;
}
if (res->count != 1) {
- *errstring = talloc_asprintf(msg, "samdb_copy_template: ERROR: template '%s' matched %d records, expected 1\n",
+ *errstring = talloc_asprintf(msg, "samdb_copy_template: ERROR: template '%s' matched %d records, expected 1",
name,
res->count);
talloc_free(res);
@@ -726,7 +728,7 @@ int samdb_copy_template(struct ldb_context *ldb,
ret = samdb_find_or_add_attribute(ldb, msg, el->name,
(char *)el->values[j].data);
if (ret) {
- *errstring = talloc_asprintf(msg, "Adding attribute %s failed.\n", el->name);
+ *errstring = talloc_asprintf(msg, "Adding attribute %s failed.", el->name);
talloc_free(res);
return ret;
}