From: Ralph Boehme Date: Thu, 10 Oct 2024 17:29:09 +0000 (+0200) Subject: smbd: fix breaking leases on rename X-Git-Tag: tdb-1.4.13~760 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=efbbe8d6f80ceb6107f20486623eee949409c0ff;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 --- 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 b43dedfec18..9f04d020c4f 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) {