1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only 2*4882a593Smuzhiyunconfig CIFS 3*4882a593Smuzhiyun tristate "SMB3 and CIFS support (advanced network filesystem)" 4*4882a593Smuzhiyun depends on INET 5*4882a593Smuzhiyun select NLS 6*4882a593Smuzhiyun select CRYPTO 7*4882a593Smuzhiyun select CRYPTO_MD4 8*4882a593Smuzhiyun select CRYPTO_MD5 9*4882a593Smuzhiyun select CRYPTO_SHA256 10*4882a593Smuzhiyun select CRYPTO_SHA512 11*4882a593Smuzhiyun select CRYPTO_CMAC 12*4882a593Smuzhiyun select CRYPTO_HMAC 13*4882a593Smuzhiyun select CRYPTO_LIB_ARC4 14*4882a593Smuzhiyun select CRYPTO_AEAD2 15*4882a593Smuzhiyun select CRYPTO_CCM 16*4882a593Smuzhiyun select CRYPTO_GCM 17*4882a593Smuzhiyun select CRYPTO_ECB 18*4882a593Smuzhiyun select CRYPTO_AES 19*4882a593Smuzhiyun select CRYPTO_LIB_DES 20*4882a593Smuzhiyun select KEYS 21*4882a593Smuzhiyun help 22*4882a593Smuzhiyun This is the client VFS module for the SMB3 family of NAS protocols, 23*4882a593Smuzhiyun (including support for the most recent, most secure dialect SMB3.1.1) 24*4882a593Smuzhiyun as well as for earlier dialects such as SMB2.1, SMB2 and the older 25*4882a593Smuzhiyun Common Internet File System (CIFS) protocol. CIFS was the successor 26*4882a593Smuzhiyun to the original dialect, the Server Message Block (SMB) protocol, the 27*4882a593Smuzhiyun native file sharing mechanism for most early PC operating systems. 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun The SMB3 protocol is supported by most modern operating systems 30*4882a593Smuzhiyun and NAS appliances (e.g. Samba, Windows 10, Windows Server 2016, 31*4882a593Smuzhiyun MacOS) and even in the cloud (e.g. Microsoft Azure). 32*4882a593Smuzhiyun The older CIFS protocol was included in Windows NT4, 2000 and XP (and 33*4882a593Smuzhiyun later) as well by Samba (which provides excellent CIFS and SMB3 34*4882a593Smuzhiyun server support for Linux and many other operating systems). Use of 35*4882a593Smuzhiyun dialects older than SMB2.1 is often discouraged on public networks. 36*4882a593Smuzhiyun This module also provides limited support for OS/2 and Windows ME 37*4882a593Smuzhiyun and similar very old servers. 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun This module provides an advanced network file system client 40*4882a593Smuzhiyun for mounting to SMB3 (and CIFS) compliant servers. It includes 41*4882a593Smuzhiyun support for DFS (hierarchical name space), secure per-user 42*4882a593Smuzhiyun session establishment via Kerberos or NTLM or NTLMv2, RDMA 43*4882a593Smuzhiyun (smbdirect), advanced security features, per-share encryption, 44*4882a593Smuzhiyun directory leases, safe distributed caching (oplock), optional packet 45*4882a593Smuzhiyun signing, Unicode and other internationalization improvements. 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun In general, the default dialects, SMB3 and later, enable better 48*4882a593Smuzhiyun performance, security and features, than would be possible with CIFS. 49*4882a593Smuzhiyun Note that when mounting to Samba, due to the CIFS POSIX extensions, 50*4882a593Smuzhiyun CIFS mounts can provide slightly better POSIX compatibility 51*4882a593Smuzhiyun than SMB3 mounts. SMB2/SMB3 mount options are also 52*4882a593Smuzhiyun slightly simpler (compared to CIFS) due to protocol improvements. 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun If you need to mount to Samba, Azure, Macs or Windows from this machine, say Y. 55*4882a593Smuzhiyun 56*4882a593Smuzhiyunconfig CIFS_STATS2 57*4882a593Smuzhiyun bool "Extended statistics" 58*4882a593Smuzhiyun depends on CIFS 59*4882a593Smuzhiyun help 60*4882a593Smuzhiyun Enabling this option will allow more detailed statistics on SMB 61*4882a593Smuzhiyun request timing to be displayed in /proc/fs/cifs/DebugData and also 62*4882a593Smuzhiyun allow optional logging of slow responses to dmesg (depending on the 63*4882a593Smuzhiyun value of /proc/fs/cifs/cifsFYI, see fs/cifs/README for more details). 64*4882a593Smuzhiyun These additional statistics may have a minor effect on performance 65*4882a593Smuzhiyun and memory utilization. 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun Unless you are a developer or are doing network performance analysis 68*4882a593Smuzhiyun or tuning, say N. 69*4882a593Smuzhiyun 70*4882a593Smuzhiyunconfig CIFS_ALLOW_INSECURE_LEGACY 71*4882a593Smuzhiyun bool "Support legacy servers which use less secure dialects" 72*4882a593Smuzhiyun depends on CIFS 73*4882a593Smuzhiyun default y 74*4882a593Smuzhiyun help 75*4882a593Smuzhiyun Modern dialects, SMB2.1 and later (including SMB3 and 3.1.1), have 76*4882a593Smuzhiyun additional security features, including protection against 77*4882a593Smuzhiyun man-in-the-middle attacks and stronger crypto hashes, so the use 78*4882a593Smuzhiyun of legacy dialects (SMB1/CIFS and SMB2.0) is discouraged. 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun Disabling this option prevents users from using vers=1.0 or vers=2.0 81*4882a593Smuzhiyun on mounts with cifs.ko 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun If unsure, say Y. 84*4882a593Smuzhiyun 85*4882a593Smuzhiyunconfig CIFS_WEAK_PW_HASH 86*4882a593Smuzhiyun bool "Support legacy servers which use weaker LANMAN security" 87*4882a593Smuzhiyun depends on CIFS && CIFS_ALLOW_INSECURE_LEGACY 88*4882a593Smuzhiyun help 89*4882a593Smuzhiyun Modern CIFS servers including Samba and most Windows versions 90*4882a593Smuzhiyun (since 1997) support stronger NTLM (and even NTLMv2 and Kerberos) 91*4882a593Smuzhiyun security mechanisms. These hash the password more securely 92*4882a593Smuzhiyun than the mechanisms used in the older LANMAN version of the 93*4882a593Smuzhiyun SMB protocol but LANMAN based authentication is needed to 94*4882a593Smuzhiyun establish sessions with some old SMB servers. 95*4882a593Smuzhiyun 96*4882a593Smuzhiyun Enabling this option allows the cifs module to mount to older 97*4882a593Smuzhiyun LANMAN based servers such as OS/2 and Windows 95, but such 98*4882a593Smuzhiyun mounts may be less secure than mounts using NTLM or more recent 99*4882a593Smuzhiyun security mechanisms if you are on a public network. Unless you 100*4882a593Smuzhiyun have a need to access old SMB servers (and are on a private 101*4882a593Smuzhiyun network) you probably want to say N. Even if this support 102*4882a593Smuzhiyun is enabled in the kernel build, LANMAN authentication will not be 103*4882a593Smuzhiyun used automatically. At runtime LANMAN mounts are disabled but 104*4882a593Smuzhiyun can be set to required (or optional) either in 105*4882a593Smuzhiyun /proc/fs/cifs (see fs/cifs/README for more detail) or via an 106*4882a593Smuzhiyun option on the mount command. This support is disabled by 107*4882a593Smuzhiyun default in order to reduce the possibility of a downgrade 108*4882a593Smuzhiyun attack. 109*4882a593Smuzhiyun 110*4882a593Smuzhiyun If unsure, say N. 111*4882a593Smuzhiyun 112*4882a593Smuzhiyunconfig CIFS_UPCALL 113*4882a593Smuzhiyun bool "Kerberos/SPNEGO advanced session setup" 114*4882a593Smuzhiyun depends on CIFS 115*4882a593Smuzhiyun select DNS_RESOLVER 116*4882a593Smuzhiyun help 117*4882a593Smuzhiyun Enables an upcall mechanism for CIFS which accesses userspace helper 118*4882a593Smuzhiyun utilities to provide SPNEGO packaged (RFC 4178) Kerberos tickets 119*4882a593Smuzhiyun which are needed to mount to certain secure servers (for which more 120*4882a593Smuzhiyun secure Kerberos authentication is required). If unsure, say Y. 121*4882a593Smuzhiyun 122*4882a593Smuzhiyunconfig CIFS_XATTR 123*4882a593Smuzhiyun bool "CIFS extended attributes" 124*4882a593Smuzhiyun depends on CIFS 125*4882a593Smuzhiyun help 126*4882a593Smuzhiyun Extended attributes are name:value pairs associated with inodes by 127*4882a593Smuzhiyun the kernel or by users (see the attr(5) manual page for details). 128*4882a593Smuzhiyun CIFS maps the name of extended attributes beginning with the user 129*4882a593Smuzhiyun namespace prefix to SMB/CIFS EAs. EAs are stored on Windows 130*4882a593Smuzhiyun servers without the user namespace prefix, but their names are 131*4882a593Smuzhiyun seen by Linux cifs clients prefaced by the user namespace prefix. 132*4882a593Smuzhiyun The system namespace (used by some filesystems to store ACLs) is 133*4882a593Smuzhiyun not supported at this time. 134*4882a593Smuzhiyun 135*4882a593Smuzhiyun If unsure, say Y. 136*4882a593Smuzhiyun 137*4882a593Smuzhiyunconfig CIFS_POSIX 138*4882a593Smuzhiyun bool "CIFS POSIX Extensions" 139*4882a593Smuzhiyun depends on CIFS && CIFS_ALLOW_INSECURE_LEGACY && CIFS_XATTR 140*4882a593Smuzhiyun help 141*4882a593Smuzhiyun Enabling this option will cause the cifs client to attempt to 142*4882a593Smuzhiyun negotiate a newer dialect with servers, such as Samba 3.0.5 143*4882a593Smuzhiyun or later, that optionally can handle more POSIX like (rather 144*4882a593Smuzhiyun than Windows like) file behavior. It also enables 145*4882a593Smuzhiyun support for POSIX ACLs (getfacl and setfacl) to servers 146*4882a593Smuzhiyun (such as Samba 3.10 and later) which can negotiate 147*4882a593Smuzhiyun CIFS POSIX ACL support. If unsure, say N. 148*4882a593Smuzhiyun 149*4882a593Smuzhiyunconfig CIFS_DEBUG 150*4882a593Smuzhiyun bool "Enable CIFS debugging routines" 151*4882a593Smuzhiyun default y 152*4882a593Smuzhiyun depends on CIFS 153*4882a593Smuzhiyun help 154*4882a593Smuzhiyun Enabling this option adds helpful debugging messages to 155*4882a593Smuzhiyun the cifs code which increases the size of the cifs module. 156*4882a593Smuzhiyun If unsure, say Y. 157*4882a593Smuzhiyun 158*4882a593Smuzhiyunconfig CIFS_DEBUG2 159*4882a593Smuzhiyun bool "Enable additional CIFS debugging routines" 160*4882a593Smuzhiyun depends on CIFS_DEBUG 161*4882a593Smuzhiyun help 162*4882a593Smuzhiyun Enabling this option adds a few more debugging routines 163*4882a593Smuzhiyun to the cifs code which slightly increases the size of 164*4882a593Smuzhiyun the cifs module and can cause additional logging of debug 165*4882a593Smuzhiyun messages in some error paths, slowing performance. This 166*4882a593Smuzhiyun option can be turned off unless you are debugging 167*4882a593Smuzhiyun cifs problems. If unsure, say N. 168*4882a593Smuzhiyun 169*4882a593Smuzhiyunconfig CIFS_DEBUG_DUMP_KEYS 170*4882a593Smuzhiyun bool "Dump encryption keys for offline decryption (Unsafe)" 171*4882a593Smuzhiyun depends on CIFS_DEBUG 172*4882a593Smuzhiyun help 173*4882a593Smuzhiyun Enabling this will dump the encryption and decryption keys 174*4882a593Smuzhiyun used to communicate on an encrypted share connection on the 175*4882a593Smuzhiyun console. This allows Wireshark to decrypt and dissect 176*4882a593Smuzhiyun encrypted network captures. Enable this carefully. 177*4882a593Smuzhiyun If unsure, say N. 178*4882a593Smuzhiyun 179*4882a593Smuzhiyunconfig CIFS_DFS_UPCALL 180*4882a593Smuzhiyun bool "DFS feature support" 181*4882a593Smuzhiyun depends on CIFS 182*4882a593Smuzhiyun select DNS_RESOLVER 183*4882a593Smuzhiyun help 184*4882a593Smuzhiyun Distributed File System (DFS) support is used to access shares 185*4882a593Smuzhiyun transparently in an enterprise name space, even if the share 186*4882a593Smuzhiyun moves to a different server. This feature also enables 187*4882a593Smuzhiyun an upcall mechanism for CIFS which contacts userspace helper 188*4882a593Smuzhiyun utilities to provide server name resolution (host names to 189*4882a593Smuzhiyun IP addresses) which is needed in order to reconnect to 190*4882a593Smuzhiyun servers if their addresses change or for implicit mounts of 191*4882a593Smuzhiyun DFS junction points. If unsure, say Y. 192*4882a593Smuzhiyun 193*4882a593Smuzhiyunconfig CIFS_NFSD_EXPORT 194*4882a593Smuzhiyun bool "Allow nfsd to export CIFS file system" 195*4882a593Smuzhiyun depends on CIFS && BROKEN 196*4882a593Smuzhiyun help 197*4882a593Smuzhiyun Allows NFS server to export a CIFS mounted share (nfsd over cifs) 198*4882a593Smuzhiyun 199*4882a593Smuzhiyunconfig CIFS_SMB_DIRECT 200*4882a593Smuzhiyun bool "SMB Direct support" 201*4882a593Smuzhiyun depends on CIFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || CIFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y 202*4882a593Smuzhiyun help 203*4882a593Smuzhiyun Enables SMB Direct support for SMB 3.0, 3.02 and 3.1.1. 204*4882a593Smuzhiyun SMB Direct allows transferring SMB packets over RDMA. If unsure, 205*4882a593Smuzhiyun say Y. 206*4882a593Smuzhiyun 207*4882a593Smuzhiyunconfig CIFS_FSCACHE 208*4882a593Smuzhiyun bool "Provide CIFS client caching support" 209*4882a593Smuzhiyun depends on CIFS=m && FSCACHE || CIFS=y && FSCACHE=y 210*4882a593Smuzhiyun help 211*4882a593Smuzhiyun Makes CIFS FS-Cache capable. Say Y here if you want your CIFS data 212*4882a593Smuzhiyun to be cached locally on disk through the general filesystem cache 213*4882a593Smuzhiyun manager. If unsure, say N. 214*4882a593Smuzhiyun 215*4882a593Smuzhiyunconfig CIFS_ROOT 216*4882a593Smuzhiyun bool "SMB root file system (Experimental)" 217*4882a593Smuzhiyun depends on CIFS=y && IP_PNP 218*4882a593Smuzhiyun help 219*4882a593Smuzhiyun Enables root file system support over SMB protocol. 220*4882a593Smuzhiyun 221*4882a593Smuzhiyun Most people say N here. 222