Skip to content

Commit ba55344

Browse files
committed
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 <[email protected]> Acked-by: Ronnie Sahlberg <[email protected]>
1 parent f2d6793 commit ba55344

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

fs/cifs/connect.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,11 +2469,12 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
24692469
pr_notice("CIFS: ignoring forcegid mount option specified with no gid= option.\n");
24702470

24712471
if (got_version == false)
2472-
pr_warn("No dialect specified on mount. Default has changed to "
2473-
"a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS "
2474-
"(SMB1). To use the less secure SMB1 dialect to access "
2475-
"old servers which do not support SMB3 (or SMB2.1) specify vers=1.0"
2476-
" on mount.\n");
2472+
pr_warn_once("No dialect specified on mount. Default has changed"
2473+
" to a more secure dialect, SMB2.1 or later (e.g. "
2474+
"SMB3.1.1), from CIFS (SMB1). To use the less secure "
2475+
"SMB1 dialect to access old servers which do not "
2476+
"support SMB3.1.1 (or even SMB3 or SMB2.1) specify "
2477+
"vers=1.0 on mount.\n");
24772478

24782479
kfree(mountdata_copy);
24792480
return 0;

0 commit comments

Comments
 (0)