Linux-CIFS Archive on lore.kernel.org
 help / color / Atom feed
* [CIFS][PATCH] Make warning when using default version (default mount) less noisy
@ 2020-03-05  6:03 Steve French
  2020-03-05  6:14 ` ronnie sahlberg
  0 siblings, 1 reply; 2+ messages in thread
From: Steve French @ 2020-03-05  6:03 UTC (permalink / raw)
  To: CIFS, samba-technical

[-- Attachment #1: Type: text/plain, Size: 737 bytes --]

    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."


-- 
Thanks,

Steve

[-- Attachment #2: 0001-CIFS-Warn-less-noisily-on-default-mount.patch --]
[-- Type: text/x-patch, Size: 2044 bytes --]

From b37d411f74677f9c5ba3fc2aef152cd66b51e85d Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
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 <stfrench@microsoft.com>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [CIFS][PATCH] Make warning when using default version (default mount) less noisy
  2020-03-05  6:03 [CIFS][PATCH] Make warning when using default version (default mount) less noisy Steve French
@ 2020-03-05  6:14 ` ronnie sahlberg
  0 siblings, 0 replies; 2+ messages in thread
From: ronnie sahlberg @ 2020-03-05  6:14 UTC (permalink / raw)
  To: Steve French; +Cc: CIFS, samba-technical

Acked-by me


On Thu, Mar 5, 2020 at 4:03 PM Steve French <smfrench@gmail.com> wrote:
>
>     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."
>
>
> --
> Thanks,
>
> Steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-05  6:03 [CIFS][PATCH] Make warning when using default version (default mount) less noisy Steve French
2020-03-05  6:14 ` ronnie sahlberg

Linux-CIFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-cifs/0 linux-cifs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-cifs linux-cifs/ https://lore.kernel.org/linux-cifs \
		linux-cifs@vger.kernel.org
	public-inbox-index linux-cifs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-cifs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git