[SMB3][PATCH] On reconnect set PreviousSessionId field in SessionSetup

Steve French smfrench at gmail.com
Thu May 31 20:32:36 UTC 2018

    smb3: on reconnect set PreviousSessionId field

    The server detects reconnect by the (non-zero) value in PreviousSessionId
    of SMB2/SMB3 SessionSetup request, but this behavior regressed due
    to commit 166cea4dc3a4f66f020cfb9286225ecd228ab61d
        "SMB2: Separate RawNTLMSSP authentication from SMB2_sess_setup"

    CC: Stable <stable at vger.kernel.org>
    CC: Sachin Prabhu <sprabhu at redhat.com>
    Signed-off-by: Steve French <smfrench at gmail.com>

diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index c92b4e6689bd..71e7a5a05f12 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -1352,6 +1352,7 @@ SMB2_sess_setup(const unsigned int xid, struct
cifs_ses *ses,
        sess_data->ses = ses;
        sess_data->buf0_type = CIFS_NO_BUFFER;
        sess_data->nls_cp = (struct nls_table *) nls_cp;
+       sess_data->previous_session = ses->Suid;

 #ifdef CONFIG_CIFS_SMB311


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-smb3-on-reconnect-set-PreviousSessionId-field.patch
Type: text/x-patch
Size: 1093 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180531/7f1775f7/0001-smb3-on-reconnect-set-PreviousSessionId-field.bin>

More information about the samba-technical mailing list