dsdb: Do not permit nested event loops when in a transaction, use a nested event...
commitbdd363a92d136b0c0dbb86d1bf77f7bc48a6b206
authorAndrew Bartlett <abartlet@samba.org>
Thu, 17 Apr 2014 03:39:56 +0000 (17 15:39 +1200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 15 Jul 2014 10:46:16 +0000 (15 12:46 +0200)
tree3473a1c80ea5cdd30bd6a7c1357a76bcec3fd659
parent5289cb9f50365832e16a7f9af7626ecbe8e19a50
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

(cherry picked from commit 401f555c28aee861385b75c371b5f44cded1d391)
source4/dsdb/samdb/ldb_modules/rootdse.c