cifsd: add Kconfig and Makefile
authorNamjae Jeon <namjae.jeon@samsung.com>
Tue, 16 Mar 2021 01:51:34 +0000 (10:51 +0900)
committerSteve French <stfrench@microsoft.com>
Tue, 11 May 2021 00:15:16 +0000 (19:15 -0500)
This adds the Kconfig and Makefile for cifsd.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/Kconfig
fs/Makefile
fs/cifsd/Kconfig [new file with mode: 0644]
fs/cifsd/Makefile [new file with mode: 0644]

index 141a856c50e717a3acd840752dd432477d72888d..7462761ebd2ffaf8babe0c55bc2a092c05f441fc 100644 (file)
@@ -344,6 +344,7 @@ config NFS_V4_2_SSC_HELPER
 source "net/sunrpc/Kconfig"
 source "fs/ceph/Kconfig"
 source "fs/cifs/Kconfig"
+source "fs/cifsd/Kconfig"
 source "fs/coda/Kconfig"
 source "fs/afs/Kconfig"
 source "fs/9p/Kconfig"
index 9c708e1fbe8fb31725ea82d79198b0b5df40ca2e..542a77374d12845372aea6cb847b7f7d81220e05 100644 (file)
@@ -98,6 +98,7 @@ obj-$(CONFIG_NLS)             += nls/
 obj-$(CONFIG_UNICODE)          += unicode/
 obj-$(CONFIG_SYSV_FS)          += sysv/
 obj-$(CONFIG_CIFS)             += cifs/
+obj-$(CONFIG_SMB_SERVER)       += cifsd/
 obj-$(CONFIG_HPFS_FS)          += hpfs/
 obj-$(CONFIG_NTFS_FS)          += ntfs/
 obj-$(CONFIG_UFS_FS)           += ufs/
diff --git a/fs/cifsd/Kconfig b/fs/cifsd/Kconfig
new file mode 100644 (file)
index 0000000..6e78960
--- /dev/null
@@ -0,0 +1,64 @@
+config SMB_SERVER
+       tristate "SMB server support (EXPERIMENTAL)"
+       depends on INET
+       select NLS
+       select NLS_UTF8
+       select CRYPTO
+       select CRYPTO_MD4
+       select CRYPTO_MD5
+       select CRYPTO_HMAC
+       select CRYPTO_ARC4
+       select CRYPTO_ECB
+       select CRYPTO_LIB_DES
+       select CRYPTO_SHA256
+       select CRYPTO_CMAC
+       select CRYPTO_SHA512
+       select CRYPTO_AEAD2
+       select CRYPTO_CCM
+       select CRYPTO_GCM
+       default n
+       help
+         Choose Y here if you want to allow SMB3 compliant clients
+         to access files residing on this system using SMB3 protocol.
+         To compile the SMB3 server support as a module,
+         choose M here: the module will be called ksmbd.
+
+         You may choose to use a samba server instead, in which
+         case you can choose N here.
+
+         You also need to install user space programs which can be found
+         in cifsd-tools, available from
+         https://github.com/cifsd-team/cifsd-tools.
+         More detail about how to run the cifsd kernel server is
+         available via README file
+         (https://github.com/cifsd-team/cifsd-tools/blob/master/README).
+
+         cifsd kernel server includes support for auto-negotiation,
+         Secure negotiate, Pre-authentication integrity, oplock/lease,
+         compound requests, multi-credit, packet signing, RDMA(smbdirect),
+         smb3 encryption, copy-offload, secure per-user session
+         establishment via NTLM or NTLMv2.
+
+config SMB_SERVER_SMBDIRECT
+       bool "Support for SMB Direct protocol"
+       depends on SMB_SERVER=m && INFINIBAND && INFINIBAND_ADDR_TRANS || SMB_SERVER=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
+       default n
+
+       help
+         Enables SMB Direct support for SMB 3.0, 3.02 and 3.1.1.
+
+         SMB Direct allows transferring SMB packets over RDMA. If unsure,
+         say N.
+
+config SMB_SERVER_CHECK_CAP_NET_ADMIN
+       bool "Enable check network administration capability"
+       depends on SMB_SERVER
+       default y
+
+       help
+         Prevent unprivileged processes to start the cifsd kernel server.
+
+config SMB_SERVER_KERBEROS5
+       bool "Support for Kerberos 5"
+       depends on SMB_SERVER
+       default n
diff --git a/fs/cifsd/Makefile b/fs/cifsd/Makefile
new file mode 100644 (file)
index 0000000..a6c03c4
--- /dev/null
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Makefile for Linux SMB3 kernel server
+#
+obj-$(CONFIG_SMB_SERVER) += ksmbd.o
+
+ksmbd-y :=     unicode.o auth.o vfs.o vfs_cache.o server.o buffer_pool.o \
+               misc.o oplock.o connection.o ksmbd_work.o crypto_ctx.o \
+               mgmt/ksmbd_ida.o mgmt/user_config.o mgmt/share_config.o \
+               mgmt/tree_connect.o mgmt/user_session.o smb_common.o \
+               transport_tcp.o transport_ipc.o smbacl.o smb2pdu.o \
+               smb2ops.o smb2misc.o asn1.o netmisc.o ndr.o
+ksmbd-$(CONFIG_SMB_SERVER_SMBDIRECT) += transport_rdma.o