From: Ralph Boehme Date: Thu, 10 Oct 2024 17:29:09 +0000 (+0200) Subject: smbd: fix breaking leases on rename X-Git-Tag: samba-4.20.7~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9581976a4ef54fd3a522f6b6290c789d5d6dc56;p=thirdparty%2Fsamba.git smbd: fix breaking leases on rename We must also break leases on other opens if the open of the rename doesn't have a lease itself. The existing test test_lease_v2_rename() that was added alongside the deferred rename server code didn't cover this case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15697 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Thu Oct 31 12:47:24 UTC 2024 on atb-devel-224 (cherry picked from commit efbbe8d6f80ceb6107f20486623eee949409c0ff) Autobuild-User(v4-20-test): Jule Anger Autobuild-Date(v4-20-test): Mon Dec 9 09:45:57 UTC 2024 on atb-devel-224 --- diff --git a/selftest/knownfail.d/samba3.smb2.compound_async b/selftest/knownfail.d/samba3.smb2.compound_async deleted file mode 100644 index 2d956ba45b0..00000000000 --- a/selftest/knownfail.d/samba3.smb2.compound_async +++ /dev/null @@ -1 +0,0 @@ -^samba3.smb2.compound_async.rename_middle\(fileserver\) diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c index 575aa26dfd8..a3eba7b2e98 100644 --- a/source3/smbd/smb2_setinfo.c +++ b/source3/smbd/smb2_setinfo.c @@ -242,10 +242,6 @@ static struct tevent_req *delay_rename_for_lease_break(struct tevent_req *req, struct timeval timeout; bool ok; - if (fsp->oplock_type != LEASE_OPLOCK) { - return NULL; - } - ok = share_mode_forall_leases( lck, delay_rename_lease_break_fn, &state); if (!ok) {