if (ret != LDB_SUCCESS) {
ldb_debug(ldb, LDB_DEBUG_ERROR,
- "Failed to connect to '%s' with backend '%s'", url, be->ops->name);
+ "Failed to connect to '%s' with backend '%s': %s", url, be->ops->name, ldb_errstring(ret));
return ret;
}
return ret;
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);
module = ldb_module_new(ldb, ldb, "ldb_tdb backend", <db_ops);
if (!module) {
+ ldb_oom(ldb);
talloc_free(ltdb);
return LDB_ERR_OPERATIONS_ERROR;
}
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;
}