s3: Add a "lock_order" argument to db_open
authorVolker Lendecke <vl@samba.org>
Fri, 6 Jan 2012 16:19:54 +0000 (17:19 +0100)
committerVolker Lendecke <vlendec@samba.org>
Wed, 18 Jan 2012 13:48:04 +0000 (14:48 +0100)
commit45e61fcf61ed9863fbe2b116fe0763fc139bbe0d
tree06ea9ead2285b4a671d102edb8824422f7325703
parente75c436fe6a9ee44f6adc744b6269e99f4920431
s3: Add a "lock_order" argument to db_open

This will be used to enforce a lock hierarchy between the databases. We have
seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb.
These should be fixed by refusing a dbwrap_fetch_locked that does not follow a
defined lock hierarchy.
30 files changed:
source3/groupdb/mapping_tdb.c
source3/lib/conn_tdb.c
source3/lib/dbwrap/dbwrap_open.c
source3/lib/dbwrap/dbwrap_open.h
source3/lib/dbwrap/dbwrap_private.h
source3/lib/g_lock.c
source3/lib/serverid.c
source3/lib/sessionid_tdb.c
source3/lib/sharesec.c
source3/locking/brlock.c
source3/locking/share_mode_lock.c
source3/modules/nfs4_acls.c
source3/modules/vfs_acl_tdb.c
source3/modules/vfs_xattr_tdb.c
source3/passdb/account_pol.c
source3/passdb/pdb_tdb.c
source3/passdb/secrets.c
source3/printing/printer_list.c
source3/registry/reg_backend_db.c
source3/smbd/notify_internal.c
source3/torture/torture.c
source3/utils/dbwrap_tool.c
source3/utils/dbwrap_torture.c
source3/utils/net_idmap.c
source3/utils/net_idmap_check.c
source3/utils/net_registry_check.c
source3/utils/status.c
source3/winbindd/idmap_autorid.c
source3/winbindd/idmap_tdb.c
source3/winbindd/idmap_tdb2.c