Skip to content

Commit ec11653

Browse files
committed
CIFS/SMB3: Update documentation to reflect SMB3 and various changes
Signed-off-by: Steve French <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]>
1 parent bf2afee commit ec11653

File tree

4 files changed

+91
-91
lines changed

4 files changed

+91
-91
lines changed

Documentation/filesystems/cifs/AUTHORS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ Igor Mammedov (DFS support)
4141
Jeff Layton (many, many fixes, as well as great work on the cifs Kerberos code)
4242
Scott Lovenberg
4343
Pavel Shilovsky (for great work adding SMB2 support, and various SMB3 features)
44+
Aurelien Aptel (for DFS SMB3 work and some key bug fixes)
45+
Ronnie Sahlberg (for SMB3 xattr work and bug fixes)
46+
Shirish Pargaonkar (for many ACL patches over the years)
47+
Sachin Prabhu (many bug fixes, including for reconnect, copy offload and security)
48+
4449

4550
Test case and Bug Report contributors
4651
-------------------------------------

Documentation/filesystems/cifs/README

Lines changed: 38 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
The CIFS VFS support for Linux supports many advanced network filesystem
2-
features such as hierarchical dfs like namespace, hardlinks, locking and more.
1+
This module supports the SMB3 family of advanced network protocols (as well
2+
as older dialects, originally called "CIFS" or SMB1).
3+
4+
The CIFS VFS module for Linux supports many advanced network filesystem
5+
features such as hierarchical DFS like namespace, hardlinks, locking and more.
36
It was designed to comply with the SNIA CIFS Technical Reference (which
47
supersedes the 1992 X/Open SMB Standard) as well as to perform best practice
58
practical interoperability with Windows 2000, Windows XP, Samba and equivalent
69
servers. This code was developed in participation with the Protocol Freedom
7-
Information Foundation.
10+
Information Foundation. CIFS and now SMB3 has now become a defacto
11+
standard for interoperating between Macs and Windows and major NAS appliances.
812

913
Please see
1014
http://protocolfreedom.org/ and
@@ -15,30 +19,11 @@ for more details.
1519
For questions or bug reports please contact:
1620
1721

22+
See the project page at: https://wiki.samba.org/index.php/LinuxCIFS_utils
23+
1824
Build instructions:
1925
==================
20-
For Linux 2.4:
21-
1) Get the kernel source (e.g.from http://www.kernel.org)
22-
and download the cifs vfs source (see the project page
23-
at http://us1.samba.org/samba/Linux_CIFS_client.html)
24-
and change directory into the top of the kernel directory
25-
then patch the kernel (e.g. "patch -p1 < cifs_24.patch")
26-
to add the cifs vfs to your kernel configure options if
27-
it has not already been added (e.g. current SuSE and UL
28-
users do not need to apply the cifs_24.patch since the cifs vfs is
29-
already in the kernel configure menu) and then
30-
mkdir linux/fs/cifs and then copy the current cifs vfs files from
31-
the cifs download to your kernel build directory e.g.
32-
33-
cp <cifs_download_dir>/fs/cifs/* to <kernel_download_dir>/fs/cifs
34-
35-
2) make menuconfig (or make xconfig)
36-
3) select cifs from within the network filesystem choices
37-
4) save and exit
38-
5) make dep
39-
6) make modules (or "make" if CIFS VFS not to be built as a module)
40-
41-
For Linux 2.6:
26+
For Linux:
4227
1) Download the kernel (e.g. from http://www.kernel.org)
4328
and change directory into the top of the kernel directory tree
4429
(e.g. /usr/src/linux-2.5.73)
@@ -61,16 +46,13 @@ would simply type "make install").
6146
If you do not have the utility mount.cifs (in the Samba 3.0 source tree and on
6247
the CIFS VFS web site) copy it to the same directory in which mount.smbfs and
6348
similar files reside (usually /sbin). Although the helper software is not
64-
required, mount.cifs is recommended. Eventually the Samba 3.0 utility program
65-
"net" may also be helpful since it may someday provide easier mount syntax for
66-
users who are used to Windows e.g.
67-
net use <mount point> <UNC name or cifs URL>
49+
required, mount.cifs is recommended. Most distros include a "cifs-utils"
50+
package that includes this utility so it is recommended to install this.
51+
6852
Note that running the Winbind pam/nss module (logon service) on all of your
6953
Linux clients is useful in mapping Uids and Gids consistently across the
7054
domain to the proper network user. The mount.cifs mount helper can be
71-
trivially built from Samba 3.0 or later source e.g. by executing:
72-
73-
gcc samba/source/client/mount.cifs.c -o mount.cifs
55+
found at cifs-utils.git on git.samba.org
7456

7557
If cifs is built as a module, then the size and number of network buffers
7658
and maximum number of simultaneous requests to one server can be configured.
@@ -79,6 +61,18 @@ Changing these from their defaults is not recommended. By executing modinfo
7961
on kernel/fs/cifs/cifs.ko the list of configuration changes that can be made
8062
at module initialization time (by running insmod cifs.ko) can be seen.
8163

64+
Recommendations
65+
===============
66+
To improve security the SMB2.1 dialect or later (usually will get SMB3) is now
67+
the new default. To use old dialects (e.g. to mount Windows XP) use "vers=1.0"
68+
on mount (or vers=2.0 for Windows Vista). Note that the CIFS (vers=1.0) is
69+
much older and less secure than the default dialect SMB3 which includes
70+
many advanced security features such as downgrade attack detection
71+
and encrypted shares and stronger signing and authentication algorithms.
72+
There are additional mount options that may be helpful for SMB3 to get
73+
improved POSIX behavior (NB: can use vers=3.0 to force only SMB3, never 2.1):
74+
"mfsymlinks" and "cifsacl" and "idsfromsid"
75+
8276
Allowing User Mounts
8377
====================
8478
To permit users to mount and unmount over directories they own is possible
@@ -98,9 +92,7 @@ and execution of suid programs on the remote target would be enabled
9892
by default. This can be changed, as with nfs and other filesystems,
9993
by simply specifying "nosuid" among the mount options. For user mounts
10094
though to be able to pass the suid flag to mount requires rebuilding
101-
mount.cifs with the following flag:
102-
103-
gcc samba/source/client/mount.cifs.c -DCIFS_ALLOW_USR_SUID -o mount.cifs
95+
mount.cifs with the following flag: CIFS_ALLOW_USR_SUID
10496

10597
There is a corresponding manual page for cifs mounting in the Samba 3.0 and
10698
later source tree in docs/manpages/mount.cifs.8
@@ -189,18 +181,18 @@ applications running on the same server as Samba.
189181
Use instructions:
190182
================
191183
Once the CIFS VFS support is built into the kernel or installed as a module
192-
(cifs.o), you can use mount syntax like the following to access Samba or Windows
193-
servers:
184+
(cifs.ko), you can use mount syntax like the following to access Samba or
185+
Mac or Windows servers:
194186

195-
mount -t cifs //9.53.216.11/e$ /mnt -o user=myname,pass=mypassword
187+
mount -t cifs //9.53.216.11/e$ /mnt -o username=myname,password=mypassword
196188

197189
Before -o the option -v may be specified to make the mount.cifs
198190
mount helper display the mount steps more verbosely.
199191
After -o the following commonly used cifs vfs specific options
200192
are supported:
201193

202-
user=<username>
203-
pass=<password>
194+
username=<username>
195+
password=<password>
204196
domain=<domain name>
205197

206198
Other cifs mount options are described below. Use of TCP names (in addition to
@@ -246,13 +238,16 @@ the Server's registry. Samba starting with version 3.10 will allow such
246238
filenames (ie those which contain valid Linux characters, which normally
247239
would be forbidden for Windows/CIFS semantics) as long as the server is
248240
configured for Unix Extensions (and the client has not disabled
249-
/proc/fs/cifs/LinuxExtensionsEnabled).
250-
241+
/proc/fs/cifs/LinuxExtensionsEnabled). In addition the mount option
242+
"mapposix" can be used on CIFS (vers=1.0) to force the mapping of
243+
illegal Windows/NTFS/SMB characters to a remap range (this mount parm
244+
is the default for SMB3). This remap ("mapposix") range is also
245+
compatible with Mac (and "Services for Mac" on some older Windows).
251246

252247
CIFS VFS Mount Options
253248
======================
254249
A partial list of the supported mount options follows:
255-
user The user name to use when trying to establish
250+
username The user name to use when trying to establish
256251
the CIFS session.
257252
password The user password. If the mount helper is
258253
installed, the user will be prompted for password

Documentation/filesystems/cifs/TODO

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Version 2.03 August 1, 2014
1+
Version 2.04 September 13, 2017
22

33
A Partial List of Missing Features
44
==================================
@@ -8,73 +8,69 @@ for visible, important contributions to this module. Here
88
is a partial list of the known problems and missing features:
99

1010
a) SMB3 (and SMB3.02) missing optional features:
11-
- RDMA
11+
- RDMA (started)
1212
- multichannel (started)
1313
- directory leases (improved metadata caching)
1414
- T10 copy offload (copy chunk is only mechanism supported)
15-
- encrypted shares
1615

1716
b) improved sparse file support
1817

1918
c) Directory entry caching relies on a 1 second timer, rather than
20-
using FindNotify or equivalent. - (started)
19+
using Directory Leases
2120

2221
d) quota support (needs minor kernel change since quota calls
2322
to make it to network filesystems or deviceless filesystems)
2423

25-
e) improve support for very old servers (OS/2 and Win9x for example)
26-
Including support for changing the time remotely (utimes command).
24+
e) Better optimize open to reduce redundant opens (using reference
25+
counts more) and to improve use of compounding in SMB3 to reduce
26+
number of roundtrips.
2727

28-
f) hook lower into the sockets api (as NFS/SunRPC does) to avoid the
29-
extra copy in/out of the socket buffers in some cases.
30-
31-
g) Better optimize open (and pathbased setfilesize) to reduce the
32-
oplock breaks coming from windows srv. Piggyback identical file
33-
opens on top of each other by incrementing reference count rather
34-
than resending (helps reduce server resource utilization and avoid
35-
spurious oplock breaks).
36-
37-
h) Add support for storing symlink info to Windows servers
38-
in the Extended Attribute format their SFU clients would recognize.
39-
40-
i) Finish inotify support so kde and gnome file list windows
28+
f) Finish inotify support so kde and gnome file list windows
4129
will autorefresh (partially complete by Asser). Needs minor kernel
4230
vfs change to support removing D_NOTIFY on a file.
4331

44-
j) Add GUI tool to configure /proc/fs/cifs settings and for display of
32+
g) Add GUI tool to configure /proc/fs/cifs settings and for display of
4533
the CIFS statistics (started)
4634

47-
k) implement support for security and trusted categories of xattrs
35+
h) implement support for security and trusted categories of xattrs
4836
(requires minor protocol extension) to enable better support for SELINUX
4937

50-
l) Implement O_DIRECT flag on open (already supported on mount)
38+
i) Implement O_DIRECT flag on open (already supported on mount)
5139

52-
m) Create UID mapping facility so server UIDs can be mapped on a per
40+
j) Create UID mapping facility so server UIDs can be mapped on a per
5341
mount or a per server basis to client UIDs or nobody if no mapping
54-
exists. This is helpful when Unix extensions are negotiated to
55-
allow better permission checking when UIDs differ on the server
56-
and client. Add new protocol request to the CIFS protocol
57-
standard for asking the server for the corresponding name of a
58-
particular uid.
42+
exists. Also better integration with winbind for resolving SID owners
43+
44+
k) Add tools to take advantage of more smb3 specific ioctls and features
45+
46+
l) encrypted file support
47+
48+
m) improved stats gathering, tools (perhaps integration with nfsometer?)
5949

60-
n) DOS attrs - returned as pseudo-xattr in Samba format (check VFAT and NTFS for this too)
50+
n) allow setting more NTFS/SMB3 file attributes remotely (currently limited to compressed
51+
file attribute via chflags) and improve user space tools for managing and
52+
viewing them.
6153

62-
o) mount check for unmatched uids
54+
o) mount helper GUI (to simplify the various configuration options on mount)
6355

64-
p) Add support for new vfs entry point for fallocate
56+
p) autonegotiation of dialects (offering more than one dialect ie SMB3.02,
57+
SMB3, SMB2.1 not just SMB3).
6558

66-
q) Add tools to take advantage of cifs/smb3 specific ioctls and features
67-
such as "CopyChunk" (fast server side file copy)
59+
q) Allow mount.cifs to be more verbose in reporting errors with dialect
60+
or unsupported feature errors.
6861

69-
r) encrypted file support
62+
r) updating cifs documentation, and user guid.
7063

71-
s) improved stats gathering, tools (perhaps integration with nfsometer?)
64+
s) Addressing bugs found by running a broader set of xfstests in standard
65+
file system xfstest suite.
7266

73-
t) allow setting more NTFS/SMB3 file attributes remotely (currently limited to compressed
74-
file attribute via chflags)
67+
t) split cifs and smb3 support into separate modules so legacy (and less
68+
secure) CIFS dialect can be disabled in environments that don't need it
69+
and simplify the code.
7570

76-
u) mount helper GUI (to simplify the various configuration options on mount)
71+
u) Finish up SMB3.1.1 dialect support
7772

73+
v) POSIX Extensions for SMB3.1.1
7874

7975
KNOWN BUGS
8076
====================================

Documentation/filesystems/cifs/cifs.txt

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
This is the client VFS module for the Common Internet File System
2-
(CIFS) protocol which is the successor to the Server Message Block
1+
This is the client VFS module for the SMB3 NAS protocol as well
2+
older dialects such as the Common Internet File System (CIFS)
3+
protocol which was the successor to the Server Message Block
34
(SMB) protocol, the native file sharing mechanism for most early
45
PC operating systems. New and improved versions of CIFS are now
56
called SMB2 and SMB3. These dialects are also supported by the
67
CIFS VFS module. CIFS is fully supported by network
7-
file servers such as Windows 2000, 2003, 2008 and 2012
8+
file servers such as Windows 2000, 2003, 2008, 2012 and 2016
89
as well by Samba (which provides excellent CIFS
9-
server support for Linux and many other operating systems), so
10+
server support for Linux and many other operating systems), Apple
11+
systems, as well as most Network Attached Storage vendors, so
1012
this network filesystem client can mount to a wide variety of
1113
servers.
1214

1315
The intent of this module is to provide the most advanced network
14-
file system function for CIFS compliant servers, including better
15-
POSIX compliance, secure per-user session establishment, high
16-
performance safe distributed caching (oplock), optional packet
16+
file system function for SMB3 compliant servers, including advanced
17+
security features, excellent parallelized high performance i/o, better
18+
POSIX compliance, secure per-user session establishment, encryption,
19+
high performance safe distributed caching (leases/oplocks), optional packet
1720
signing, large files, Unicode support and other internationalization
1821
improvements. Since both Samba server and this filesystem client support
19-
the CIFS Unix extensions, the combination can provide a reasonable
20-
alternative to NFSv4 for fileserving in some Linux to Linux environments,
21-
not just in Linux to Windows environments.
22+
the CIFS Unix extensions (and in the future SMB3 POSIX extensions),
23+
the combination can provide a reasonable alternative to other network and
24+
cluster file systems for fileserving in some Linux to Linux environments,
25+
not just in Linux to Windows (or Linux to Mac) environments.
2226

2327
This filesystem has an mount utility (mount.cifs) that can be obtained from
2428

0 commit comments

Comments
 (0)