summaryrefslogtreecommitdiff
path: root/lib/ldb/ldb_tdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-18 11:30:52 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-10-18 13:13:34 +1100
commit9d49945ff037e46f5083dc88816acafc2343a77c (patch)
tree9fc5decdf5a434226a7def0bbb04489afb2e9b42 /lib/ldb/ldb_tdb
parent94fbe2e4bdab8bcd021fedfff71114bbf3d72ca1 (diff)
downloadsamba-9d49945ff037e46f5083dc88816acafc2343a77c.tar.gz
samba-9d49945ff037e46f5083dc88816acafc2343a77c.tar.bz2
samba-9d49945ff037e46f5083dc88816acafc2343a77c.zip
ldb: Output more error information when a connect fails
Diffstat (limited to 'lib/ldb/ldb_tdb')
-rw-r--r--lib/ldb/ldb_tdb/ldb_tdb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c
index 3630a18594..a85e41d987 100644
--- a/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -1499,6 +1499,8 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url,
tdb_flags, open_flags,
ldb_get_create_perms(ldb), ldb);
if (!ltdb->tdb) {
+ ldb_asprintf_errstring(ldb,
+ "Unable to open tdb '%s'", path);
ldb_debug(ldb, LDB_DEBUG_ERROR,
"Unable to open tdb '%s'", path);
talloc_free(ltdb);
@@ -1513,6 +1515,7 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url,
module = ldb_module_new(ldb, ldb, "ldb_tdb backend", &ltdb_ops);
if (!module) {
+ ldb_oom(ldb);
talloc_free(ltdb);
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -1520,6 +1523,8 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url,
talloc_steal(module, ltdb);
if (ltdb_cache_load(module) != 0) {
+ ldb_asprintf_errstring(ldb,
+ "Unable to load ltdb cache records of tdb '%s'", path);
talloc_free(module);
return LDB_ERR_OPERATIONS_ERROR;
}