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.21.6~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5988e475fa4ccf8468caf3854d3d5a20c90cc74b;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 993d3a96591..ce2ccaccd11 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -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; }