From: Volker Lendecke Date: Wed, 26 Feb 2025 15:04:01 +0000 (+0100) Subject: vfs: Fix a lock order violation in unlinkat_acl_tdb() X-Git-Tag: samba-4.21.5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbd038e3db901b1fcffd9947afb4a0313696354e;p=thirdparty%2Fsamba.git vfs: Fix a lock order violation in unlinkat_acl_tdb() unlinkat is called when the share mode record is locked. Bug: https://bugzilla.samba.org/show_bug.cgi?id=15791 Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme (cherry picked from commit 93bc238aa91ec8041648d17e11bf235132974eda) --- diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c index 5ecba7ba757..e113076e572 100644 --- a/source3/modules/vfs_acl_tdb.c +++ b/source3/modules/vfs_acl_tdb.c @@ -58,7 +58,7 @@ static bool acl_tdb_init(void) become_root(); acl_db = db_open(NULL, dbname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600, - DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE); + DBWRAP_LOCK_ORDER_2, DBWRAP_FLAG_NONE); unbecome_root(); if (acl_db == NULL) {