Skip to content

Commit

Permalink
ksmbd: add SMB v1 support
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Dec 6, 2024
1 parent 9e010ff commit cb4244d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions package/kernel/ksmbd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,27 @@ endef
# The last two DEPENDS are hacks in order to get CONFIG_ASN1 and CONFIG_OID_REGISTRY
# which it seems can't be selected independently. Some bug in either base or upstream.

define KernelPackage/fs-ksmbd/description
Ksmbd is an In-kernel SMBv(1)2/3 fileserver.
It's an implementation of the SMB protocol in kernel space for sharing files and IPC services over network.
endef
define KernelPackage/fs-ksmbd/config
config KSMBD_SMB_INSECURE_SERVER
bool "Support for insecure SMB1/CIFS and SMB2.0 protocols"
depends on PACKAGE_kmod-fs-ksmbd
help
This enables deprecated insecure protocols dialects: SMB1/CIFS and SMB2.0.
default n
endef
ifeq ($(CONFIG_KSMBD_SMB_INSECURE_SERVER),y)
PKG_EXTRA_KCONFIG:=CONFIG_SMB_INSECURE_SERVER=y
EXTRA_CFLAGS += -DCONFIG_SMB_INSECURE_SERVER=1
endif

define Build/Compile
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(PKG_EXTRA_KCONFIG) \
CONFIG_SMB_SERVER=m \
modules
endef
Expand Down
2 changes: 1 addition & 1 deletion package/kernel/ksmbd/patches/02-linux-is_dot_dotdot.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#endif

-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 60)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 110)
static inline bool is_dot_dotdot(const char *name, size_t len)
{
return len && unlikely(name[0] == '.') &&

0 comments on commit cb4244d

Please sign in to comment.