Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs version warning fix from Steve French:
"As requested, additional kernel warning messages to clarify the
default dialect changes"

[ There is still some discussion about exactly which version should be
the new default. Longer-term we have auto-negotiation coming, but
that's not there yet.. - Linus ]

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
Fix warning messages when mounting to older servers

+27 -2
+21 -1
fs/cifs/connect.c
··· 1223 1223 char *tmp_end, *value; 1224 1224 char delim; 1225 1225 bool got_ip = false; 1226 + bool got_version = false; 1226 1227 unsigned short port = 0; 1227 1228 struct sockaddr *dstaddr = (struct sockaddr *)&vol->dstaddr; 1228 1229 ··· 1875 1874 pr_warn("CIFS: server netbiosname longer than 15 truncated.\n"); 1876 1875 break; 1877 1876 case Opt_ver: 1877 + /* version of mount userspace tools, not dialect */ 1878 1878 string = match_strdup(args); 1879 1879 if (string == NULL) 1880 1880 goto out_nomem; 1881 1881 1882 + /* If interface changes in mount.cifs bump to new ver */ 1882 1883 if (strncasecmp(string, "1", 1) == 0) { 1884 + if (strlen(string) > 1) { 1885 + pr_warn("Bad mount helper ver=%s. Did " 1886 + "you want SMB1 (CIFS) dialect " 1887 + "and mean to type vers=1.0 " 1888 + "instead?\n", string); 1889 + goto cifs_parse_mount_err; 1890 + } 1883 1891 /* This is the default */ 1884 1892 break; 1885 1893 } 1886 1894 /* For all other value, error */ 1887 - pr_warn("CIFS: Invalid version specified\n"); 1895 + pr_warn("CIFS: Invalid mount helper version specified\n"); 1888 1896 goto cifs_parse_mount_err; 1889 1897 case Opt_vers: 1898 + /* protocol version (dialect) */ 1890 1899 string = match_strdup(args); 1891 1900 if (string == NULL) 1892 1901 goto out_nomem; 1893 1902 1894 1903 if (cifs_parse_smb_version(string, vol) != 0) 1895 1904 goto cifs_parse_mount_err; 1905 + got_version = true; 1896 1906 break; 1897 1907 case Opt_sec: 1898 1908 string = match_strdup(args); ··· 1984 1972 vol->override_gid = override_gid; 1985 1973 else if (override_gid == 1) 1986 1974 pr_notice("CIFS: ignoring forcegid mount option specified with no gid= option.\n"); 1975 + 1976 + if (got_version == false) 1977 + pr_warn("No dialect specified on mount. Default has changed to " 1978 + "a more secure dialect, SMB3 (vers=3.0), from CIFS " 1979 + "(SMB1). To use the less secure SMB1 dialect to access " 1980 + "old servers which do not support SMB3 specify vers=1.0" 1981 + " on mount. For somewhat newer servers such as Windows " 1982 + "7 try vers=2.1.\n"); 1987 1983 1988 1984 kfree(mountdata_copy); 1989 1985 return 0;
+6 -1
fs/cifs/smb2pdu.c
··· 514 514 * No tcon so can't do 515 515 * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]); 516 516 */ 517 - if (rc != 0) 517 + if (rc == -EOPNOTSUPP) { 518 + cifs_dbg(VFS, "Dialect not supported by server. Consider " 519 + "specifying vers=1.0 or vers=2.1 on mount for accessing" 520 + " older servers\n"); 521 + goto neg_exit; 522 + } else if (rc != 0) 518 523 goto neg_exit; 519 524 520 525 cifs_dbg(FYI, "mode 0x%x\n", rsp->SecurityMode);