From patchwork Fri Jun 26 19:58:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Aurich X-Patchwork-Id: 11628583 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E9C181731 for ; Fri, 26 Jun 2020 20:06:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE9032075D for ; Fri, 26 Jun 2020 20:06:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=darkrain42.org header.i=@darkrain42.org header.b="RIARyi3z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726256AbgFZUG2 (ORCPT ); Fri, 26 Jun 2020 16:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725803AbgFZUG1 (ORCPT ); Fri, 26 Jun 2020 16:06:27 -0400 Received: from mail.darkrain42.org (o-chul.darkrain42.org [IPv6:2600:3c01::f03c:91ff:fe96:292c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF342C03E979 for ; Fri, 26 Jun 2020 13:06:27 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by o-chul.darkrain42.org (Postfix) with ESMTPSA id 293C28106; Fri, 26 Jun 2020 12:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=darkrain42.org; s=a; t=1593201518; bh=4XUOf+5g3ikrQNVCO8jlpGBNK7iGyBoM157TWLt6i90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RIARyi3zfjrjIu6RqeKYkRwA27Z/1/tHByVKtXQX64ncSXc2eWqdKzdPyIUUkqFG6 B0999MMA3iMGx/v64ilxWH+A5d6PccSFmi3+pFuDK+f4B9HVCp5eiRPu/TiEX6SKd5 oWdWcOYnMGdbM5Y1IU2NbmtgnrLh0xKGBUwDhZQOunBMOlQ9Lk7zlL8HC0yASRnG5j EogbM5rqmKP8rnmukSv36bmrQew79I/CCJUyN+Bfwig51liDYL+J7w8tKFGmiDkNAW ooaTDHq9zXiyi8vwI5xwRaA6g98DYdQTK8IDpN6okqaqcbiZTglpxqaLFBDS2fkyLR qjFu0RUyo3NYg== From: Paul Aurich To: linux-cifs@vger.kernel.org, sfrench@samba.org Cc: paul@darkrain42.org Subject: [PATCH 1/6] cifs: Display local UID details for SMB sessions in DebugData Date: Fri, 26 Jun 2020 12:58:04 -0700 Message-Id: <20200626195809.429507-2-paul@darkrain42.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200626195809.429507-1-paul@darkrain42.org> References: <20200626195809.429507-1-paul@darkrain42.org> MIME-Version: 1.0 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org This is useful for distinguishing SMB sessions on a multiuser mount. Signed-off-by: Paul Aurich --- fs/cifs/cifs_debug.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index fc98b97b396a..53588d7517b4 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c @@ -399,6 +399,10 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v) if (ses->sign) seq_puts(m, " signed"); + seq_printf(m, "\n\tUser: %d Cred User: %d", + from_kuid(&init_user_ns, ses->linux_uid), + from_kuid(&init_user_ns, ses->cred_uid)); + if (ses->chan_count > 1) { seq_printf(m, "\n\n\tExtra Channels: %zu\n", ses->chan_count-1); @@ -406,7 +410,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v) cifs_dump_channel(m, j, &ses->chans[j]); } - seq_puts(m, "\n\tShares:"); + seq_puts(m, "\n\n\tShares:"); j = 0; seq_printf(m, "\n\t%d) IPC: ", j); From patchwork Fri Jun 26 19:58:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Aurich X-Patchwork-Id: 11628591 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 916B9186E for ; Fri, 26 Jun 2020 20:06:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 714AE20720 for ; Fri, 26 Jun 2020 20:06:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=darkrain42.org header.i=@darkrain42.org header.b="NyKHLkWA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726279AbgFZUG2 (ORCPT ); Fri, 26 Jun 2020 16:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbgFZUG1 (ORCPT ); Fri, 26 Jun 2020 16:06:27 -0400 Received: from mail.darkrain42.org (o-chul.darkrain42.org [IPv6:2600:3c01::f03c:91ff:fe96:292c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED003C03E97B for ; Fri, 26 Jun 2020 13:06:27 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by o-chul.darkrain42.org (Postfix) with ESMTPSA id 638D58200; Fri, 26 Jun 2020 12:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=darkrain42.org; s=a; t=1593201518; bh=UIV+UdMzRQng4EjZobPdEbeAatANG7mug78TIFwRy7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NyKHLkWAugTfiuSn1JrPo0uSeoTW+fnFcgNTXhiDxHsVSd94l6lBHT48eg+jawX7Z L1POGJOldjjRi8Wyr2Ctvsa7Me3rEY8PfUfr0rqzH+mmVhhpI+L6BMPfozh4xmHrI5 E3Cn1i4UTfDbH57h1iTBSJfm3HzldqhyLpcuqDW8xdgZmLM78Rzadd5MWcvQo6WkrT Y/Im7KpvUNlC4sE2yEIg9NJUwZVNaOTk0JAbUCsevYnakuaCyL+UwSQCLLdjakbbqU Q0bSThVQymCLUtxvyuIlbHwr8dLE+ZR0xUkQpuEq2soLFppnppl4TbSTm3YzAhoz7T KU0jZcKSttDNQ== From: Paul Aurich To: linux-cifs@vger.kernel.org, sfrench@samba.org Cc: paul@darkrain42.org Subject: [PATCH 2/6] SMB3: Honor 'seal' flag for multiuser mounts Date: Fri, 26 Jun 2020 12:58:05 -0700 Message-Id: <20200626195809.429507-3-paul@darkrain42.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200626195809.429507-1-paul@darkrain42.org> References: <20200626195809.429507-1-paul@darkrain42.org> MIME-Version: 1.0 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Ensure multiuser SMB3 mounts use encryption for all users' tcons if the mount options are configured to require encryption. Without this, only the primary tcon and IPC tcons are guaranteed to be encrypted. Per-user tcons would only be encrypted if the server was configured to require encryption. Signed-off-by: Paul Aurich CC: Stable --- fs/cifs/connect.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 5fac34f192af..804509f7f3a1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -5309,6 +5309,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) vol_info->no_linux_ext = !master_tcon->unix_ext; vol_info->sectype = master_tcon->ses->sectype; vol_info->sign = master_tcon->ses->sign; + vol_info->seal = master_tcon->seal; rc = cifs_set_vol_auth(vol_info, master_tcon->ses); if (rc) { From patchwork Fri Jun 26 19:58:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Aurich X-Patchwork-Id: 11628589 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6BE371862 for ; Fri, 26 Jun 2020 20:06:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4AD4D20720 for ; Fri, 26 Jun 2020 20:06:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=darkrain42.org header.i=@darkrain42.org header.b="Y9Jd2vc5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726192AbgFZUG2 (ORCPT ); Fri, 26 Jun 2020 16:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbgFZUG1 (ORCPT ); Fri, 26 Jun 2020 16:06:27 -0400 Received: from mail.darkrain42.org (o-chul.darkrain42.org [IPv6:2600:3c01::f03c:91ff:fe96:292c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03DADC03E97E for ; Fri, 26 Jun 2020 13:06:27 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by o-chul.darkrain42.org (Postfix) with ESMTPSA id 9C6148201; Fri, 26 Jun 2020 12:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=darkrain42.org; s=a; t=1593201518; bh=Mw3ySGLclDExgqtCSYh8MQIvlnlfvu7QtUl//1QfNy8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y9Jd2vc5XAHyETcr84KeFrrg1d7cV91SZbEaOQUhEALPNJMUNH+aN5lXDaGo13nS2 iwWQQ22X7WRLcYizn7wiC6dV4kKwGrJIMSm1qqeW3UlOyCnD1kcP00K4D2HzlSvkWN mEoYGxxwoBX0B9k4tMNMcMu08q5uxAD7Xoc+N00VUcT/sqJ8wjxNh2BC5zuL6qLvTy bPn1/Aeg4g82p750v8HWEajspiR9ehhCOQEsVqZsQC3eT7SLUBdKTrF8ZHXek7mX2X BxBi+OQKb0RQ6WjBbgjnQZOXYxXFvpZmHiSuYgSAbjyMSJT0sUzlvDiwKwCk/7b5hQ ar1hw01JUQXYA== From: Paul Aurich To: linux-cifs@vger.kernel.org, sfrench@samba.org Cc: paul@darkrain42.org Subject: [PATCH 3/6] SMB3: Honor persistent/resilient handle flags for multiuser mounts Date: Fri, 26 Jun 2020 12:58:06 -0700 Message-Id: <20200626195809.429507-4-paul@darkrain42.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200626195809.429507-1-paul@darkrain42.org> References: <20200626195809.429507-1-paul@darkrain42.org> MIME-Version: 1.0 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Without this: - persistent handles will only be enabled for per-user tcons if the server advertises the 'Continuous Availabity' capability - resilient handles would never be enabled for per-user tcons Signed-off-by: Paul Aurich CC: Stable --- fs/cifs/connect.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 804509f7f3a1..dc7f875d2caf 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -5306,6 +5306,8 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) vol_info->nocase = master_tcon->nocase; vol_info->nohandlecache = master_tcon->nohandlecache; vol_info->local_lease = master_tcon->local_lease; + vol_info->resilient = master_tcon->use_resilient; + vol_info->persistent = master_tcon->use_persistent; vol_info->no_linux_ext = !master_tcon->unix_ext; vol_info->sectype = master_tcon->ses->sectype; vol_info->sign = master_tcon->ses->sign; From patchwork Fri Jun 26 19:58:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Aurich X-Patchwork-Id: 11628593 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BCABE1731 for ; Fri, 26 Jun 2020 20:06:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C8002075D for ; Fri, 26 Jun 2020 20:06:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=darkrain42.org header.i=@darkrain42.org header.b="mDquYK1D" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726086AbgFZUG3 (ORCPT ); Fri, 26 Jun 2020 16:06:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726206AbgFZUG2 (ORCPT ); Fri, 26 Jun 2020 16:06:28 -0400 Received: from mail.darkrain42.org (o-chul.darkrain42.org [IPv6:2600:3c01::f03c:91ff:fe96:292c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0901DC08C5DC for ; Fri, 26 Jun 2020 13:06:27 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by o-chul.darkrain42.org (Postfix) with ESMTPSA id D43718206; Fri, 26 Jun 2020 12:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=darkrain42.org; s=a; t=1593201519; bh=9za62X7ei3Mtgfo4yDqoRR65ub07xw3ZUznkkqyqf0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mDquYK1DzKgycxMKHPTNVlXOc0dWJAmyzuwnYfCPKuihdwFBpd9+Kt4ahwKX5JPde FBP/lvGBajL+uOegw02pHMLz8oZxMDXqRuZqspm+45n1PDIfbsGXb4DjMVvA8TBNoP P7Dl5587APWK6XylgpN5649tscwCLLwaLxiVR9+ZOZcuQJrrvbyaQpXVqJn//Bl8Ee K4qdf90gRXLpfxhXUvZI/dTkJ6uXQS2EVF5CON0wqOEt00KH8RTIHXusytdGasImTc Sqxgp84D5Q1CuQzFc6iCgmud8BkH+kBeN5VV8AbkxaiB6v8kGFiMBCh+I0k2fqJmwZ kVi+jcWAIF2iw== From: Paul Aurich To: linux-cifs@vger.kernel.org, sfrench@samba.org Cc: paul@darkrain42.org Subject: [PATCH 4/6] SMB3: Honor lease disabling for multiuser mounts Date: Fri, 26 Jun 2020 12:58:07 -0700 Message-Id: <20200626195809.429507-5-paul@darkrain42.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200626195809.429507-1-paul@darkrain42.org> References: <20200626195809.429507-1-paul@darkrain42.org> MIME-Version: 1.0 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Fixes: 3e7a02d47872 ("smb3: allow disabling requesting leases") Signed-off-by: Paul Aurich CC: Stable --- fs/cifs/connect.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index dc7f875d2caf..6e71a1578e34 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -5306,6 +5306,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) vol_info->nocase = master_tcon->nocase; vol_info->nohandlecache = master_tcon->nohandlecache; vol_info->local_lease = master_tcon->local_lease; + vol_info->no_lease = master_tcon->no_lease; vol_info->resilient = master_tcon->use_resilient; vol_info->persistent = master_tcon->use_persistent; vol_info->no_linux_ext = !master_tcon->unix_ext; From patchwork Fri Jun 26 19:58:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Aurich X-Patchwork-Id: 11628585 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1C4FA13B4 for ; Fri, 26 Jun 2020 20:06:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EFBC82075D for ; Fri, 26 Jun 2020 20:06:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=darkrain42.org header.i=@darkrain42.org header.b="qh80C2aq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725803AbgFZUG2 (ORCPT ); Fri, 26 Jun 2020 16:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbgFZUG1 (ORCPT ); Fri, 26 Jun 2020 16:06:27 -0400 Received: from mail.darkrain42.org (o-chul.darkrain42.org [IPv6:2600:3c01::f03c:91ff:fe96:292c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2496C03E97A for ; Fri, 26 Jun 2020 13:06:27 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by o-chul.darkrain42.org (Postfix) with ESMTPSA id 222138207; Fri, 26 Jun 2020 12:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=darkrain42.org; s=a; t=1593201519; bh=9V4rwJWmYz2iTiPLcvwCDcy3IMYn7Hmx+L5mzVszO1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qh80C2aqoSPLjP6dPFQVddQ8tz7qnPe+n7hXOedViK9EIBfKbdS2V+Yrc1rz2ICV/ 67T4aXFiHjg3/W2VpH13J6jfDVhHlnJmgeJM4129wWeJ2dg8v3WL3feQ0Q/qFSqV2P q1N1OwkqpH8RksgUgmsFYBJ/IdSRBPGW/Yt9qv1EYOfG7uAK8p5kRfuUbt3taILr6q JHqyWPfqmv9qCQcZKCQUr/xUxyegaha3OOf30Yy0x7dj5Q2dD6LotP3rcSq70Yklvv e+6UjbeiYJRLR1Wmx3LQevJZv2p5uLD3Dg8jR8Ehps9gg51PHdMesjve3HvjgX3ofO QRUEIg9pDv2YQ== From: Paul Aurich To: linux-cifs@vger.kernel.org, sfrench@samba.org Cc: paul@darkrain42.org Subject: [PATCH 5/6] SMB3: Honor 'handletimeout' flag for multiuser mounts Date: Fri, 26 Jun 2020 12:58:08 -0700 Message-Id: <20200626195809.429507-6-paul@darkrain42.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200626195809.429507-1-paul@darkrain42.org> References: <20200626195809.429507-1-paul@darkrain42.org> MIME-Version: 1.0 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Fixes: ca567eb2b3f0 ("SMB3: Allow persistent handle timeout to be configurable on mount") Signed-off-by: Paul Aurich CC: Stable --- fs/cifs/connect.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 6e71a1578e34..dada6d51e034 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -5309,6 +5309,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) vol_info->no_lease = master_tcon->no_lease; vol_info->resilient = master_tcon->use_resilient; vol_info->persistent = master_tcon->use_persistent; + vol_info->handle_timeout = master_tcon->handle_timeout; vol_info->no_linux_ext = !master_tcon->unix_ext; vol_info->sectype = master_tcon->ses->sectype; vol_info->sign = master_tcon->ses->sign; From patchwork Fri Jun 26 19:58:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Aurich X-Patchwork-Id: 11628587 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 42BB814B7 for ; Fri, 26 Jun 2020 20:06:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2258B2075D for ; Fri, 26 Jun 2020 20:06:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=darkrain42.org header.i=@darkrain42.org header.b="FwLLl7p5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726065AbgFZUG2 (ORCPT ); Fri, 26 Jun 2020 16:06:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726192AbgFZUG1 (ORCPT ); Fri, 26 Jun 2020 16:06:27 -0400 Received: from mail.darkrain42.org (o-chul.darkrain42.org [IPv6:2600:3c01::f03c:91ff:fe96:292c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 086D2C08C5DB for ; Fri, 26 Jun 2020 13:06:27 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by o-chul.darkrain42.org (Postfix) with ESMTPSA id 6405A820D; Fri, 26 Jun 2020 12:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=darkrain42.org; s=a; t=1593201519; bh=U1/e4618DWBEvKVi0ZtS1tXPmfaFu/pDnqhn/OQxHzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FwLLl7p5uSgweY4K4z7gYhif3DkyJZXnpT2koY+djZnKhnenAzZmRfRlswdZs7Ouy vH6mEgq4dEjLr3pqql7wOC6Lh5iAg3luP4uTwa3h521ph8GFZ2ntoD9Liq8dgluG65 2+zCjhPXRp7da6ooWMTY6N3A4V2VTKFXjfwzm0ZoKGslVO+WQOjy+MaN6QA784f5IZ IUUflWwy5rsefRC/9F0J0eGyx+I/JUBe4b4fZLoypZrHJYCRgOir19i+LsGFX/GC1i 6lGx8oP27O8sBUXmV/xAe+EHgektzRs+v+8ne8jmkpJf+z8lH0vboB8LoBsAN1f6kY s3/5+1m/2PMqA== From: Paul Aurich To: linux-cifs@vger.kernel.org, sfrench@samba.org Cc: paul@darkrain42.org Subject: [PATCH 6/6] SMB3: Honor 'posix' flag for multiuser mounts Date: Fri, 26 Jun 2020 12:58:09 -0700 Message-Id: <20200626195809.429507-7-paul@darkrain42.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200626195809.429507-1-paul@darkrain42.org> References: <20200626195809.429507-1-paul@darkrain42.org> MIME-Version: 1.0 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org The flag from the primary tcon needs to be copied into the volume info so that cifs_get_tcon will try to enable extensions on the per-user tcon. At that point, since posix extensions must have already been enabled on the superblock, don't try to needlessly adjust the mount flags. Fixes: ce558b0e17f8 ("smb3: Add posix create context for smb3.11 posix mounts") Fixes: b326614ea215 ("smb3: allow "posix" mount option to enable new SMB311 protocol extensions") Signed-off-by: Paul Aurich --- fs/cifs/connect.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index dada6d51e034..a61abde09ffe 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -5311,6 +5311,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) vol_info->persistent = master_tcon->use_persistent; vol_info->handle_timeout = master_tcon->handle_timeout; vol_info->no_linux_ext = !master_tcon->unix_ext; + vol_info->linux_ext = master_tcon->posix_extensions; vol_info->sectype = master_tcon->ses->sectype; vol_info->sign = master_tcon->ses->sign; vol_info->seal = master_tcon->seal; @@ -5339,10 +5340,6 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, kuid_t fsuid) goto out; } - /* if new SMB3.11 POSIX extensions are supported do not remap / and \ */ - if (tcon->posix_extensions) - cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_POSIX_PATHS; - if (cap_unix(ses)) reset_cifs_unix_caps(0, tcon, NULL, vol_info);