diff options
author | Steve French <smfrench@gmail.com> | 2016-09-20 22:56:13 -0500 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2016-10-12 12:08:31 -0500 |
commit | c2afb8147e69819885493edf3a7c1ce03aaf2d4e (patch) | |
tree | 280a23800e282ba1a79a3297c4cfdbcf241975ff /fs/cifs/smb2pdu.c | |
parent | 7d414f396c91a3382e51cf628c1cf0709ad0188b (diff) | |
download | linux-c2afb8147e69819885493edf3a7c1ce03aaf2d4e.tar.bz2 |
Set previous session id correctly on SMB3 reconnect
Signed-off-by: Steve French <steve.french@primarydata.com>
CC: Stable <stable@vger.kernel.org>
Reported-by: David Goebel <davidgoe@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 967a7904fb8f..e8638432a233 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -604,6 +604,7 @@ SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses, char *security_blob = NULL; unsigned char *ntlmssp_blob = NULL; bool use_spnego = false; /* else use raw ntlmssp */ + u64 previous_session = ses->Suid; cifs_dbg(FYI, "Session Setup\n"); @@ -641,6 +642,10 @@ ssetup_ntlmssp_authenticate: return rc; req->hdr.SessionId = 0; /* First session, not a reauthenticate */ + + /* if reconnect, we need to send previous sess id, otherwise it is 0 */ + req->PreviousSessionId = previous_session; + req->Flags = 0; /* MBZ */ /* to enable echos and oplocks */ req->hdr.CreditRequest = cpu_to_le16(3); |