summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-22 12:31:42 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 08:16:54 +1100
commit36f8ece9de5e5bd9f885bba84ac6377c1ed8f7a9 (patch)
tree3465330a07cb3de30c8d8d95e540e1522cd8d474
parentdb3f0e8ec1bfc6d3f27195ee38f53489501e731e (diff)
downloadsamba-36f8ece9de5e5bd9f885bba84ac6377c1ed8f7a9.tar.gz
samba-36f8ece9de5e5bd9f885bba84ac6377c1ed8f7a9.tar.bz2
samba-36f8ece9de5e5bd9f885bba84ac6377c1ed8f7a9.zip
s4-ldb: show the error code as well as errstr
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/lib/ldb/tools/ldbadd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/ldb/tools/ldbadd.c b/source4/lib/ldb/tools/ldbadd.c
index 4ff07a5bef..e618ab52f7 100644
--- a/source4/lib/ldb/tools/ldbadd.c
+++ b/source4/lib/ldb/tools/ldbadd.c
@@ -72,8 +72,9 @@ static int process_file(struct ldb_context *ldb, FILE *f, int *count)
ret = ldb_add_ctrl(ldb, ldif->msg,req_ctrls);
if (ret != LDB_SUCCESS) {
- fprintf(stderr, "ERR: \"%s\" on DN %s\n",
- ldb_errstring(ldb), ldb_dn_get_linearized(ldif->msg->dn));
+ fprintf(stderr, "ERR: %s : \"%s\" on DN %s\n",
+ ldb_strerror(ret), ldb_errstring(ldb),
+ ldb_dn_get_linearized(ldif->msg->dn));
failures++;
} else {
(*count)++;