]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
smb3: check for and properly advertise directory lease support
authorSteve French <stfrench@microsoft.com>
Fri, 31 Aug 2018 20:12:10 +0000 (15:12 -0500)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:47:21 +0000 (19:47 -0600)
commit7b9349b60e3c596ebe7fc98a0e7c12d7e515cc3c
treebbdfc73bb3e81707725c7b47895bd5ebb84e7026
parent085afed52a381c4d078717f157d813f59857f115
smb3: check for and properly advertise directory lease support

BugLink: https://bugs.launchpad.net/bugs/1836117
commit f801568332321e2b1e7a8bd26c3e4913a312a2ec upstream.

Although servers will typically ignore unsupported features,
we should advertise the support for directory leases (as
Windows e.g. does) in the negotiate protocol capabilities we
pass to the server, and should check for the server capability
(CAP_DIRECTORY_LEASING) before sending a lease request for an
open of a directory.  This will prevent us from accidentally
sending directory leases to SMB2.1 or SMB2 server for example.

Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c