1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

ldb_tdb: ltdb_tdb_delete require active transaction

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Gary Lockyer 2018-03-15 11:37:06 +13:00 committed by Andrew Bartlett
parent e001c5fb5f
commit 1fceb64dc2

View File

@ -674,6 +674,10 @@ static int ltdb_tdb_delete(struct ltdb_private *ltdb, struct ldb_val ldb_key)
.dptr = ldb_key.data,
.dsize = ldb_key.length
};
bool transaction_active = tdb_transaction_active(ltdb->tdb);
if (transaction_active == false){
return LDB_ERR_PROTOCOL_ERROR;
}
return tdb_delete(ltdb->tdb, tdb_key);
}