From: Ralph Boehme Date: Wed, 2 Apr 2025 10:43:15 +0000 (+0200) Subject: smbd: check can_lock in strict_lock_check_default() X-Git-Tag: samba-4.22.1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da75aa8271b8f5ccdfed0ecc366e916006ae6c9d;p=thirdparty%2Fsamba.git smbd: check can_lock in strict_lock_check_default() BUG: https://bugzilla.samba.org/show_bug.cgi?id=15767 Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Ralph Boehme Signed-off-by: Stefan Metzmacher (cherry picked from commit 678f28c1af7c160ffdcb0e4baa0a7d4b9906f2e5) --- diff --git a/source3/locking/locking.c b/source3/locking/locking.c index 77311151b54..12e4b1c15f8 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -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; }