summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-11-30 10:16:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:41 -0500
commitaee9e6c7cdc46640a5dc8e95c1e4c16057d74b29 (patch)
treeb361c0f24947e85576481d9c9705b64d60b61996 /source4
parent6045b6f314be519cfb7faeeef6b3daaac673582f (diff)
downloadsamba-aee9e6c7cdc46640a5dc8e95c1e4c16057d74b29.tar.gz
samba-aee9e6c7cdc46640a5dc8e95c1e4c16057d74b29.tar.bz2
samba-aee9e6c7cdc46640a5dc8e95c1e4c16057d74b29.zip
r19965: make the output a bit nicer
metze (This used to be commit 8655db41c1e776261ac61a975ca1883b7b59c6aa)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index 99288d2b5f..7127c35f43 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -120,11 +120,12 @@ static struct ldb_dn *ltdb_index_key(struct ldb_context *ldb,
h = ldb_attrib_handler(ldb, attr);
r = h->canonicalise_fn(ldb, ldb, value, &v);
if (r != LDB_SUCCESS) {
+ const char *errstr = ldb_errstring(ldb);
/* canonicalisation can be refused. For example,
a attribute that takes wildcards will refuse to canonicalise
if the value contains a wildcard */
- ldb_asprintf_errstring(ldb, "Failed to create index key for attribute '%s':%s:%s",
- attr, ldb_strerror(r), ldb_errstring(ldb));
+ ldb_asprintf_errstring(ldb, "Failed to create index key for attribute '%s':%s%s%s",
+ attr, ldb_strerror(r), (errstr?":":""), (errstr?errstr:""));
talloc_free(attr_folded);
return NULL;
}