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.22.1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34a2e467259cad93b12caaf2b7a4dbfa68f68929;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 f2d2692159f..4a7965c7e9f 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) {