]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: check can_lock in strict_lock_check_default()
authorRalph Boehme <slow@samba.org>
Wed, 2 Apr 2025 10:43:15 +0000 (12:43 +0200)
committerJule Anger <janger@samba.org>
Thu, 17 Apr 2025 11:31:14 +0000 (11:31 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15767

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 678f28c1af7c160ffdcb0e4baa0a7d4b9906f2e5)

source3/locking/locking.c

index 77311151b54eb1c16c61287cb0714d80b5676752..12e4b1c15f85c2cec13ea639b41052709cadaea5 100644 (file)
@@ -118,7 +118,10 @@ bool strict_lock_check_default(files_struct *fsp, struct lock_struct *plock)
                return True;
        }
 
-       if (!lp_locking(fsp->conn->params) || !strict_locking) {
+       if (!lp_locking(fsp->conn->params) ||
+           !strict_locking ||
+           !fsp->fsp_flags.can_lock)
+       {
                return True;
        }