]> 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)
committerRalph Boehme <slow@samba.org>
Wed, 2 Apr 2025 18:05:48 +0000 (18:05 +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>
source3/locking/locking.c

index e04377e4a5ca3bb2637f764668461d4eee797eb7..e9f069cc4f0243965cece94ed5ac16a8bfdf03a9 100644 (file)
@@ -117,7 +117,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;
        }