From: Gary Lockyer Date: Wed, 14 Mar 2018 22:36:33 +0000 (+1300) Subject: ldb_tdb: ltdb_tdb_store require active transaction X-Git-Tag: ldb-1.4.0~702 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e001c5fb5f2de686cb86c9aae8741ae5776bde64;p=thirdparty%2Fsamba.git ldb_tdb: ltdb_tdb_store require active transaction Signed-off-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c index bfd3770c320..5476e665e9c 100644 --- a/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/lib/ldb/ldb_tdb/ldb_tdb.c @@ -428,6 +428,10 @@ static int ltdb_tdb_store(struct ltdb_private *ltdb, struct ldb_val ldb_key, .dptr = ldb_data.data, .dsize = ldb_data.length }; + bool transaction_active = tdb_transaction_active(ltdb->tdb); + if (transaction_active == false){ + return LDB_ERR_PROTOCOL_ERROR; + } return tdb_store(ltdb->tdb, key, data, flags); }