s4-ldb: use ldb_wrap_fork_hook() to cancel child transactions
authorAndrew Tridgell <tridge@samba.org>
Fri, 23 Oct 2009 03:46:34 +0000 (14:46 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 23 Oct 2009 03:52:18 +0000 (14:52 +1100)
source4/lib/ldb_wrap.c
source4/min_versions.m4

index 0427a9c37838ab2955bd1cb80e8288ea5049ee6b..1166acd3a2281503205d081bd5defbc901f9ba47 100644 (file)
@@ -260,6 +260,10 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
  */
 void ldb_wrap_fork_hook(void)
 {
  */
 void ldb_wrap_fork_hook(void)
 {
-       
+       struct ldb_wrap *w;
+
+       for (w=ldb_wrap_list; w; w=w->next) {
+               ldb_transaction_cancel_noerr(w->ldb);
+       }       
 }
 
 }
 
index 6e49783778a635e01b7741f6566a9d0109363d0d..34abaedbc9d961bdf170aadbea62826ce5b1772f 100644 (file)
@@ -2,5 +2,5 @@
 # if we use the ones installed in the system.
 define(TDB_MIN_VERSION,1.1.7)
 define(TALLOC_MIN_VERSION,2.0.0)
 # if we use the ones installed in the system.
 define(TDB_MIN_VERSION,1.1.7)
 define(TALLOC_MIN_VERSION,2.0.0)
-define(LDB_REQUIRED_VERSION,0.9.7)
+define(LDB_REQUIRED_VERSION,0.9.8)
 define(TEVENT_REQUIRED_VERSION,0.9.8)
 define(TEVENT_REQUIRED_VERSION,0.9.8)