git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e001c5f
)
ldb_tdb: ltdb_tdb_delete require active transaction
author
Gary Lockyer
<gary@catalyst.net.nz>
Wed, 14 Mar 2018 22:37:06 +0000
(11:37 +1300)
committer
Andrew Bartlett
<abartlet@samba.org>
Fri, 6 Apr 2018 00:08:45 +0000
(
02:08
+0200)
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/ldb_tdb/ldb_tdb.c
patch
|
blob
|
history
diff --git
a/lib/ldb/ldb_tdb/ldb_tdb.c
b/lib/ldb/ldb_tdb/ldb_tdb.c
index 5476e665e9ccf180e8a52daae295011cce96b19f..1d06566aa30adcd8033d72d6a0e7106658bd275a 100644
(file)
--- a/
lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/
lib/ldb/ldb_tdb/ldb_tdb.c
@@
-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);
}