1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

ldb_tdb: Give a debug message as well as setting the error string if prepare_commit() fails

This is a serious condition, and should be logged.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13033

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2017-09-14 15:01:39 +12:00 committed by Douglas Bagnall
parent 75e88e40a2
commit 13777d35d0

View File

@ -1196,10 +1196,12 @@ static int ltdb_prepare_commit(struct ldb_module *module)
if (tdb_transaction_prepare_commit(ltdb->tdb) != 0) {
ret = ltdb_err_map(tdb_error(ltdb->tdb));
ltdb->in_transaction--;
ldb_asprintf_errstring(ldb_module_get_ctx(module),
"Failure during tdb_transaction_prepare_commit(): %s -> %s",
tdb_errorstr(ltdb->tdb),
ldb_strerror(ret));
ldb_debug_set(ldb_module_get_ctx(module),
LDB_DEBUG_FATAL,
"Failure during "
"tdb_transaction_prepare_commit(): %s -> %s",
tdb_errorstr(ltdb->tdb),
ldb_strerror(ret));
return ret;
}