From 13777d35d0be8d7e90fb3610c8c374e03415b9fd Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 14 Sep 2017 15:01:39 +1200 Subject: [PATCH] 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 Reviewed-by: Douglas Bagnall --- lib/ldb/ldb_tdb/ldb_tdb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c index 055d8354b73..3d4241f742b 100644 --- a/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/lib/ldb/ldb_tdb/ldb_tdb.c @@ -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; }