From patchwork Thu May 31 20:32:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 10441943 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 83ADF603B5 for ; Thu, 31 May 2018 20:32:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70043291A8 for ; Thu, 31 May 2018 20:32:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64AF4291AC; Thu, 31 May 2018 20:32:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DDAD291A8 for ; Thu, 31 May 2018 20:32:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754645AbeEaUc6 (ORCPT ); Thu, 31 May 2018 16:32:58 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:32895 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754171AbeEaUc6 (ORCPT ); Thu, 31 May 2018 16:32:58 -0400 Received: by mail-pf0-f194.google.com with SMTP id a20-v6so11343139pfo.0 for ; Thu, 31 May 2018 13:32:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=q6yHlO1crumF9AAxpKXNWW6SM+9nHK2S3f45wNrNEsI=; b=g0D3+rySLEGN+rqfucPY+5y8pL4pt9xv6wuQECde7ciTOkHa3HPGJdvkBJq3BmtscE KtBiHid5f3XsTOX7Uh0eyhRHtyb1ba9HexEWlf/U2qD2aaB+RBf75hthdVEmKpp7Q/Jn /Tm0Js1nZseE3GhdxzGlNtFcVI8fCyk1MreWXZ0nrUAPvow5uqELK9zDyWMlDqAjc7Us n7Ak9t9jguHtLHtoytOaTEYnnzSCvk+XsIbg3/d15nQ70AOkPmmtBPd9keNsEbO9IQvO EhdbqryvrtQy7Htp6OpnujSwEP1B14PXICxfHURwEvDHoTnHyeQ0SaOlHeZueQllRDho gmEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=q6yHlO1crumF9AAxpKXNWW6SM+9nHK2S3f45wNrNEsI=; b=PvD2Nj5xfjQUs0rUFwLKitJkuFxOOEuD56q/++3yXMdkYXvm/rTbifhG8TwckSOlIs j1ZKrEjlkIEo0rxD5MEHvx+xOP/jwgWYLUQjII1oWMgfC6izZDuJToowUlT0Itiy8/hm sHoyHd1HcRxurJ7CtyPkG2oGcKXwU2/yYon9hVrqO41tfKhA0MG4j7K2eX/MgczEy7SP muko+aCSe3+U8iivOaMdLeKSqFy1aOEaZHvRY+S0cybMX46ENJPzFSh5VFuTHVxo7gs/ Ak4xYHBCd3z9ZQfif1Q/NtRmW7Zb8f6OumLMHX5GX6dkNROrkNGq7XHNsNDrQvpRp4Ah J7Sg== X-Gm-Message-State: ALKqPwfOHf1aJsuEoYB5QZxjNPENJP0zSBM/IcsSV4n2h2ANTH3QAQ+f 7jY0DJmQVoZALyn0ppStDzA64HnDLqCdOK2+cg/+NVLv X-Google-Smtp-Source: ADUXVKIiuup8PWkgVleLpK1HcTmzjdxfmEnvgQZTpLQG5nY19U2hpsTtHcbJJtPoNGqCbNzwnNSKKtayKlvNr/2JRAE= X-Received: by 2002:a65:4289:: with SMTP id j9-v6mr6618703pgp.136.1527798776947; Thu, 31 May 2018 13:32:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:80cc:0:0:0:0 with HTTP; Thu, 31 May 2018 13:32:36 -0700 (PDT) From: Steve French Date: Thu, 31 May 2018 15:32:36 -0500 Message-ID: Subject: [SMB3][PATCH] On reconnect set PreviousSessionId field in SessionSetup To: CIFS Cc: samba-technical , Sachin Prabhu Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 CC: Sachin Prabhu Signed-off-by: Steve French /* Reviewed-by: Ronnie Sahlberg From bac1fdb1383256699c19edaa6ec1d6a389b2f638 Mon Sep 17 00:00:00 2001 From: Steve French 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 CC: Sachin Prabhu Signed-off-by: Steve French --- 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