diff mbox series

[SMB3] On reconnect set PreviousSessionId field in SessionSetup

Message ID CAH2r5mvhCV--kNHV4gsu6x1orpprUoaW9uk00Ypv1=CjUKoS0Q@mail.gmail.com
State New
Headers show
Series [SMB3] On reconnect set PreviousSessionId field in SessionSetup | expand

Commit Message

Steve French May 31, 2018, 8:32 p.m. UTC
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@vger.kernel.org>
    CC: Sachin Prabhu <sprabhu@redhat.com>
    Signed-off-by: Steve French <smfrench@gmail.com>

        /*

Comments

ronnie sahlberg May 31, 2018, 8:51 p.m. UTC | #1
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>

On Fri, Jun 1, 2018 at 6:32 AM, Steve French via samba-technical
<samba-technical@lists.samba.org> wrote:
>     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@vger.kernel.org>
>     CC: Sachin Prabhu <sprabhu@redhat.com>
>     Signed-off-by: Steve French <smfrench@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
>         /*
>
>
> --
> Thanks,
>
> Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

From bac1fdb1383256699c19edaa6ec1d6a389b2f638 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Thu, 31 May 2018 15:19:25 -0500
Subject: [PATCH] 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@vger.kernel.org>
CC: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
---
 fs/cifs/smb2pdu.c | 1 +
 1 file changed, 1 insertion(+)

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
 	/*
-- 
2.17.0