]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: fix handling of directory leases and oplock levels
authorRalph Boehme <slow@samba.org>
Sat, 22 Mar 2025 15:59:07 +0000 (16:59 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 28 Mar 2025 07:53:25 +0000 (07:53 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15836

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): Fri Mar 28 07:53:25 UTC 2025 on atb-devel-224

selftest/knownfail.d/samba3.smb2.dirlease [deleted file]
source3/smbd/open.c

diff --git a/selftest/knownfail.d/samba3.smb2.dirlease b/selftest/knownfail.d/samba3.smb2.dirlease
deleted file mode 100644 (file)
index 0aa9d23..0000000
+++ /dev/null
@@ -1 +0,0 @@
-^samba3.smb2.dirlease.oplocks\(fileserver\)
index a9e68bad468b19d75549b01b89dc1367c1f6ec84..25f54428bb15b905d4ce937b6a167a5ec44c3917 100644 (file)
@@ -5165,6 +5165,13 @@ static NTSTATUS open_directory(connection_struct *conn,
                keep_locked = true;
        }
 
+       if ((oplock_request != NO_OPLOCK) && (oplock_request != LEASE_OPLOCK)) {
+               /*
+                * No oplocks on directories, only leases
+                */
+               oplock_request = NO_OPLOCK;
+       }
+
        lck_state = (struct open_ntcreate_lock_state) {
                .fsp                    = fsp,
                .object_type            = "directory",