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
401f555 dsdb: Do not permit nested event loops when in a transaction, use a nested event context
source4/dsdb/samdb/ldb_modules/rootdse.c | 93 +++++++++++++++++++++++++-----
1 file changed, 80 insertions(+), 13 deletions(-)
Upstream: gitweb.samba.org