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:
8d1b11a
)
ldb_tdb: ltdb_tdb_store require active transaction
author
Gary Lockyer
<gary@catalyst.net.nz>
Wed, 14 Mar 2018 22:36:33 +0000
(11:36 +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 bfd3770c3202b67bea016cbf830487b94a2149ae..5476e665e9ccf180e8a52daae295011cce96b19f 100644
(file)
--- 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);
}