dsdb: Do not permit nested event loops when in a transaction, use a nested event...
authorAndrew Bartlett <abartlet@samba.org>
Thu, 17 Apr 2014 03:39:56 +0000 (15:39 +1200)
committerStefan Metzmacher <metze@samba.org>
Tue, 6 May 2014 11:36:20 +0000 (13:36 +0200)
commit401f555c28aee861385b75c371b5f44cded1d391
treec8c5847841eb8e925ab79964112a4e0e24098580
parent543c5bf94187473271767ad782439abbfccda00d
dsdb: Do not permit nested event loops when in a transaction, use a nested event context

It is never safe to execute arbitary code inside a transaction - we
need to get in and get out, not run other events for the rest of the
server.

This patch avoids that by creating a private event loop during
transactions, so no unexpected operations fire, and returning the
original one when we finish it.

If an event fires during an LDB transaction, an unrelated operation
can occur during the transaction, and if the transaction were to be
cancelled, there would be a silent rollback (despite the client having
been indicated success).

Additionally, other processes could be called via IRPC that need to
operate on the database but are locked out due to the ongoing
transaction.

Andrew Bartlett

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10582
Change-Id: I22322fc006e61d7291da17cdf6431416ebb7b30f
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue May  6 13:36:20 CEST 2014 on sn-devel-104
source4/dsdb/samdb/ldb_modules/rootdse.c