From 45e61fcf61ed9863fbe2b116fe0763fc139bbe0d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 6 Jan 2012 17:19:54 +0100 Subject: 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. --- source3/lib/sessionid_tdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/lib/sessionid_tdb.c') diff --git a/source3/lib/sessionid_tdb.c b/source3/lib/sessionid_tdb.c index 6fd3bbc487..5782c9a544 100644 --- a/source3/lib/sessionid_tdb.c +++ b/source3/lib/sessionid_tdb.c @@ -34,7 +34,8 @@ static struct db_context *session_db_ctx(void) session_db_ctx_ptr = db_open(NULL, lock_path("sessionid.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT|TDB_INCOMPATIBLE_HASH, - O_RDWR | O_CREAT, 0644); + O_RDWR | O_CREAT, 0644, + DBWRAP_LOCK_ORDER_1); return session_db_ctx_ptr; } -- cgit