]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: fix breaking leases on rename
authorRalph Boehme <slow@samba.org>
Thu, 10 Oct 2024 17:29:09 +0000 (19:29 +0200)
committerJule Anger <janger@samba.org>
Mon, 9 Dec 2024 09:45:57 +0000 (09:45 +0000)
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 <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
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 <janger@samba.org>
Autobuild-Date(v4-20-test): Mon Dec  9 09:45:57 UTC 2024 on atb-devel-224

selftest/knownfail.d/samba3.smb2.compound_async [deleted file]
source3/smbd/smb2_setinfo.c

diff --git a/selftest/knownfail.d/samba3.smb2.compound_async b/selftest/knownfail.d/samba3.smb2.compound_async
deleted file mode 100644 (file)
index 2d956ba..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba3.smb2.compound_async.rename_middle\(fileserver\)
index 575aa26dfd834648825e8e062b74d45ad74961f9..a3eba7b2e9870ee6fe6004be22fedfae65601133 100644 (file)
@@ -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) {