summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-09-03 07:58:18 +0200
committerStefan Metzmacher <metze@samba.org>2007-12-21 03:32:24 +0100
commiteca74dfd1733fda116ddfd9f75f3aff42d8f580d (patch)
tree4bceea454454151d2ff01a988790ef3f61e05e69
parentd9f4fda0823caa56576368037e5f3825dcf8897d (diff)
downloadsamba-eca74dfd1733fda116ddfd9f75f3aff42d8f580d.tar.gz
samba-eca74dfd1733fda116ddfd9f75f3aff42d8f580d.tar.bz2
samba-eca74dfd1733fda116ddfd9f75f3aff42d8f580d.zip
r24919: Merge build fix and improved error strings to release branch.
Andrew Bartlett (This used to be commit f189553db73c7d93d30cfa36073d86be14427f13)
-rw-r--r--source4/dsdb/samdb/samdb.c6
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c2
2 files changed, 5 insertions, 3 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;
}
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 72f12564ed..531cfc49e5 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -2284,7 +2284,7 @@ static NTSTATUS dcesrv_lsa_CreateSecret(struct dcesrv_call_state *dce_call, TALL
/* pull in all the template attributes. Note this is always from the global samdb */
ret = samdb_copy_template(secret_state->policy->sam_ldb, msg,
- "(&(cn=TemplateSecret)(objectclass=secretTemplate))", &errstr);
+ "secret", &errstr);
if (ret != 0) {
DEBUG(0,("Failed to load TemplateSecret from samdb: %s\n",
errstr));