summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2018-04-22 19:51:22 -0500
committerSteve French <stfrench@microsoft.com>2018-04-25 11:15:20 -0500
commit0d5ec281c0175d10f8d9be4d4a9c5fb37767ed00 (patch)
tree2e7191435919faa93f227c40680c97bcb6189f3a /fs/cifs
parent23657ad7305ee8b263d27335abdd00917764c9cf (diff)
downloadlinux-stable-0d5ec281c0175d10f8d9be4d4a9c5fb37767ed00.tar.gz
linux-stable-0d5ec281c0175d10f8d9be4d4a9c5fb37767ed00.tar.bz2
linux-stable-0d5ec281c0175d10f8d9be4d4a9c5fb37767ed00.zip
SMB311: Fix reconnect
The preauth hash was not being recalculated properly on reconnect of SMB3.11 dialect mounts (which caused access denied repeatedly on auto-reconnect). Fixes: 8bd68c6e47ab ("CIFS: implement v3.11 preauth integrity") Signed-off-by: Steve French <smfrench@gmail.com> CC: Stable <stable@vger.kernel.org> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/transport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 3fb0e433b8e2..927226a2122f 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -753,7 +753,7 @@ cifs_send_recv(const unsigned int xid, struct cifs_ses *ses,
goto out;
#ifdef CONFIG_CIFS_SMB311
- if (ses->status == CifsNew)
+ if ((ses->status == CifsNew) || (optype & CIFS_NEG_OP))
smb311_update_preauth_hash(ses, rqst->rq_iov+1,
rqst->rq_nvec-1);
#endif
@@ -798,7 +798,7 @@ cifs_send_recv(const unsigned int xid, struct cifs_ses *ses,
*resp_buf_type = CIFS_SMALL_BUFFER;
#ifdef CONFIG_CIFS_SMB311
- if (ses->status == CifsNew) {
+ if ((ses->status == CifsNew) || (optype & CIFS_NEG_OP)) {
struct kvec iov = {
.iov_base = buf + 4,
.iov_len = get_rfc1002_length(buf)