summaryrefslogtreecommitdiff
path: root/lib/ldb/common/ldb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-01-26 09:35:21 +1100
committerStefan Metzmacher <metze@samba.org>2013-01-26 13:42:46 +0100
commit1d1ea72574cfa22ee6207d0e9787d0271db3b5c2 (patch)
treeabe9cc8db6ddeab01b61d1f823569a3e3ad6a557 /lib/ldb/common/ldb.c
parent1ea6fabcde6cbd57aed06926193ac68f5887e96b (diff)
downloadsamba-1d1ea72574cfa22ee6207d0e9787d0271db3b5c2.tar.gz
samba-1d1ea72574cfa22ee6207d0e9787d0271db3b5c2.tar.bz2
samba-1d1ea72574cfa22ee6207d0e9787d0271db3b5c2.zip
ldb: Ensure to decrement the transaction_active whenever we delete a transaction
This is in the error path for prepare_commit, which rarely fails, but when it does we need to ensure that when a new transaction is opened, that it really starts a new transaction. We bump the version to recognise critical fix for the AD DC Without this fix, a single invalid inbound replicated link disables all subsequent replication as we operate without a transaction (which is refused by ldb_tdb). Andrew Bartlett Reviewed-by: Matthieu Patou <mat@matws.net> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/ldb/common/ldb.c')
-rw-r--r--lib/ldb/common/ldb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ldb/common/ldb.c b/lib/ldb/common/ldb.c
index 7a997f7824..3dc6d87228 100644
--- a/lib/ldb/common/ldb.c
+++ b/lib/ldb/common/ldb.c
@@ -408,6 +408,7 @@ int ldb_transaction_prepare_commit(struct ldb_context *ldb)
status = module->ops->prepare_commit(module);
if (status != LDB_SUCCESS) {
+ ldb->transaction_active--;
/* if a module fails the prepare then we need
to call the end transaction for everyone */
FIRST_OP(ldb, del_transaction);