From patchwork Thu Mar 5 06:03:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 11421217 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 A37F314BC for ; Thu, 5 Mar 2020 06:03:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7AE822146E for ; Thu, 5 Mar 2020 06:03:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="byICpEeZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725875AbgCEGD1 (ORCPT ); Thu, 5 Mar 2020 01:03:27 -0500 Received: from mail-yw1-f52.google.com ([209.85.161.52]:46163 "EHLO mail-yw1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbgCEGD0 (ORCPT ); Thu, 5 Mar 2020 01:03:26 -0500 Received: by mail-yw1-f52.google.com with SMTP id y62so4570136ywd.13 for ; Wed, 04 Mar 2020 22:03:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=di+BCj3E+sDLdxcnjG5LaOk3AYwvIBNiHoUh8uNXoGU=; b=byICpEeZWjWJPD1hxQ/G+1BJJP1wWTiokIlS+gh2ktFZOul0c8MkPRWC4AP6rHQEpG PQDg3uTm4NHyvD9aklhWjhFYTzE3vOYXTXNmbjnQGi9XrDWNSafXeTn87dxPBMG2YGME YOR5Abw4hzEmx9hXgcbfy0GenfbH2gCmUjLJwDiDv8jdHLrthHGw2MGepr+ZHprSBPIp Vd5K5+4gCeueJNln5gvbu83P2Slxnr+/3swDr/NvoFq/4Xt4mnMbZ7awmGmWtAM31zPg yVcktiZahVMfqWgByIJz7M9ukJH6rU//VKDKbJit0i37l6vyDHqOmr7p0DcTYGLpxznJ LNEg== 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; bh=di+BCj3E+sDLdxcnjG5LaOk3AYwvIBNiHoUh8uNXoGU=; b=q1m9hZ7xFrOXAalkv2Fab38N/3o9BllDXwlRBncJy+LVPbwLWpPvPt+teOa0ufQ7He ME1RN2Q5TiueVnQ9gaG7suyllfNNkB1afVV+rXOar6NnzXA9CsOmF/CDyNPS7R9rMZUi Cus5cfRrp+mdZNVe3NIVFA0yrsuzo0z7+m0yUkumnATRBnDdkoedpiiG9CK7o7ButIAS 4P/FfTOGy8aN4wn+hnxFBl8o7P1BLIR7bbzWYKmXUnlcfSImsGFze24WG3rAKrZMPZf8 5j6I2P/5PmHRgT/bYYClMMvHOMpmKUurxGEVlpsEa4UItS1cWAiT90/Q/Asz4S2qD4oM YrAg== X-Gm-Message-State: ANhLgQ2GMLhxSvN/HH5s7G6PoxRfw6AxwZlLHngzfU6lbaJi/XosauqL fPo8j7PWgYYFiZGmUIyzxG5eYs8YhsNnprtUY7L71x/VdHo= X-Google-Smtp-Source: ADFU+vufV/a8AY4MVXaLNBJqveSHQH/fP36hAnhwZ9sTDF0/qerRYfOFqBAdW2ZqU0EYBUIeyuWMBsq7Ya90eJPqA+A= X-Received: by 2002:a25:e805:: with SMTP id k5mr6032493ybd.14.1583388205615; Wed, 04 Mar 2020 22:03:25 -0800 (PST) MIME-Version: 1.0 From: Steve French Date: Thu, 5 Mar 2020 00:03:14 -0600 Message-ID: Subject: [CIFS][PATCH] Make warning when using default version (default mount) less noisy To: CIFS , samba-technical Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org The warning we print on mount about how to use less secure dialects (when the user does not specify a version on mount) is useful but is noisy to print on every default mount, and can be changed to a warn_once. Slightly updated the warning text as well to note SMB3.1.1 which has been the default which is typically negotiated (for a few years now) by most servers. "No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3.1.1), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3.1.1 (or even SMB3 or SMB2.1) specify vers=1.0 on mount." From b37d411f74677f9c5ba3fc2aef152cd66b51e85d Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 4 Mar 2020 23:56:52 -0600 Subject: [PATCH] CIFS: Warn less noisily on default mount The warning we print on mount about how to use less secure dialects (when the user does not specify a version on mount) is useful but is noisy to print on every default mount, and can be changed to a warn_once. Slightly updated the warning text as well to note SMB3.1.1 which has been the default which is typically negotiated (for a few years now) by most servers. "No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3.1.1), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3.1.1 (or even SMB3 or SMB2.1) specify vers=1.0 on mount." Signed-off-by: Steve French --- fs/cifs/connect.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 46b602dfc4d3..25262446b222 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2469,11 +2469,12 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, pr_notice("CIFS: ignoring forcegid mount option specified with no gid= option.\n"); if (got_version == false) - pr_warn("No dialect specified on mount. Default has changed to " - "a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS " - "(SMB1). To use the less secure SMB1 dialect to access " - "old servers which do not support SMB3 (or SMB2.1) specify vers=1.0" - " on mount.\n"); + pr_warn_once("No dialect specified on mount. Default has changed" + " to a more secure dialect, SMB2.1 or later (e.g. " + "SMB3.1.1), from CIFS (SMB1). To use the less secure " + "SMB1 dialect to access old servers which do not " + "support SMB3.1.1 (or even SMB3 or SMB2.1) specify " + "vers=1.0 on mount.\n"); kfree(mountdata_copy); return 0; -- 2.20.1