]> 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)
committerRalph Boehme <slow@samba.org>
Thu, 31 Oct 2024 12:47:24 +0000 (12:47 +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

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 b43dedfec18e4f43ce68ebb6bc51415ef0d488b4..9f04d020c4fb9feb8de6f52154b98a244b62774a 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) {