1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
samba-mirror/source4/dsdb
Andrew Bartlett 401f555c28 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
2014-05-06 13:36:20 +02:00
..
common dsdb: Allow SAMR server to return the computed, not actual badPwdCount 2014-04-02 17:12:47 +02:00
dns lib/param: Create a seperate server role for "active directory domain controller" 2012-06-15 09:18:33 +02:00
kcc dsdb: Make it harder to corrupt the database by requiring DBCHECK or RELAX for final object deletion 2014-05-03 07:57:12 +02:00
repl dsdb: Do not update notify_uSN until the transaction is genuinely committed to the DB 2014-03-27 00:36:31 +01:00
samdb dsdb: Do not permit nested event loops when in a transaction, use a nested event context 2014-05-06 13:36:20 +02:00
schema dsdb: Convert the full string from UTF16 to UTF8, including embedded NULLs 2013-09-26 22:05:12 +02:00
tests/python selftest: Add test for password lockout 2014-04-02 17:12:48 +02:00
pydsdb.c pydsdb: Raise a more useful exception when dsdb_wellknown_dn fails. 2013-09-24 07:44:29 +02:00
samdb.pc.in s4-pkgconfig: add @LIB_RPATH@ to our link flags 2010-12-08 12:46:00 +01:00
wscript_build Introduce system MIT krb5 build with --with-system-mitkrb5 option. 2012-05-23 17:51:50 +03:00