From 34a2e467259cad93b12caaf2b7a4dbfa68f68929 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 26 Feb 2025 16:04:01 +0100 Subject: [PATCH] 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) --- source3/modules/vfs_acl_tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.47.2