Merge pull request #14647 from neheb/k9

[19.07] ksmbd(-tools): update to 3.3.4
This commit is contained in:
Hauke Mehrtens 2021-02-16 22:26:50 +00:00 committed by GitHub
commit 90af10d015
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 62 deletions

View file

@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ksmbd
PKG_VERSION:=3.1.3
PKG_VERSION:=3.3.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/cifsd-team/cifsd/archive/$(PKG_VERSION)/
PKG_HASH:=c3c4531d3806117218d23e0552edfe883f978a00b7293180dd2919694102fcb9
PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/cifsd/tar.gz/$(PKG_VERSION)?
PKG_HASH:=4f8b7610ba084f6813cbb85bb6c07af50ba542e928c370e79022039fa027bc9a
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
@ -29,6 +29,7 @@ define KernelPackage/fs-ksmbd
+kmod-crypto-md4 \
+kmod-crypto-md5 \
+kmod-crypto-hmac \
+kmod-crypto-arc4 \
+kmod-crypto-ecb \
+kmod-crypto-des \
+kmod-crypto-sha256 \
@ -36,7 +37,8 @@ define KernelPackage/fs-ksmbd
+kmod-crypto-sha512 \
+kmod-crypto-aead \
+kmod-crypto-ccm \
+kmod-crypto-gcm
+kmod-crypto-gcm \
+kmod-lib-crc32c
endef
define KernelPackage/fs-ksmbd/description
@ -59,7 +61,7 @@ EXTRA_CFLAGS += -DCONFIG_SMB_INSECURE_SERVER=1
endif
define Build/Compile
$(KERNEL_MAKE) SUBDIRS="$(PKG_BUILD_DIR)" \
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(PKG_EXTRA_KCONFIG) \
CONFIG_SMB_SERVER=m \

View file

@ -1,5 +1,5 @@
--- a/glob.h 2019-12-08
+++ b/glob.h 2019-12-08
--- a/glob.h
+++ b/glob.h
@@ -7,6 +7,8 @@
#ifndef __KSMBD_GLOB_H
#define __KSMBD_GLOB_H
@ -8,3 +8,4 @@
+
#include <linux/ctype.h>
#include <linux/version.h>

View file

@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ksmbd-tools
PKG_VERSION:=3.2.1
PKG_VERSION:=3.3.4
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/cifsd-team/cifsd-tools/archive/$(PKG_VERSION)/
PKG_HASH:=acb4d97cbb0b22ad42ed1536bdd2c28af2a3c698664c058da59a644d5e6df599
PKG_SOURCE_URL:=https://codeload.github.com/cifsd-team/ksmbd-tools/tar.gz/$(PKG_VERSION)?
PKG_HASH:=f7065da4008292bcaf43b15190715b4f224919f7d60f18b79b836eab6ee6d43b
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
@ -96,7 +96,7 @@ CONFIGURE_ARGS += \
CONFIGURE_VARS += GLIB_LIBS="$(STAGING_DIR)/usr/lib/libglib-2.0.a"
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -liconv $(if $(INTL_FULL),-lintl)
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -liconv $(if $(INTL_FULL),-lintl) $(if $(CONFIG_USE_GLIBC),-lpthread)
define Package/ksmbd-server/install
$(INSTALL_DIR) $(1)/usr/sbin

View file

@ -5,31 +5,33 @@ USE_PROCD=1
SMBD_IFACE=""
config_get_sane()
{
config_get "$@"
set -- "$(echo "$1" | tr -d '<>[]{};%?=#\n')"
}
smb_header()
{
config_get SMBD_IFACE $1 interface "lan"
config_get_sane SMBD_IFACE "$1" interface "lan"
# resolve interfaces
local interfaces
interfaces=$(
. /lib/functions/network.sh
local net
for net in $SMBD_IFACE; do
local device
network_is_up $net || continue
network_is_up "$net" || continue
network_get_device device "$net"
echo -n "${device:-$net} "
printf "%s " "${device:-$net}"
done
)
local workgroup description
local hostname
hostname="$(cat /proc/sys/kernel/hostname)"
# we dont use netbios anymore as default and wsd/avahi is dns based
hostname="$(cat /proc/sys/kernel/hostname | tr -d '{};%?=#\n')"
config_get workgroup $1 workgroup "WORKGROUP"
config_get description $1 description "Ksmbd on OpenWrt"
config_get_bool ALLOW_LEGACY_PROTOCOLS $1 allow_legacy_protocols 0
config_get_sane workgroup "$1" workgroup "WORKGROUP"
config_get_sane description "$1" description "Ksmbd on OpenWrt"
config_get_bool ALLOW_LEGACY_PROTOCOLS "$1" allow_legacy_protocols 0
sed -e "s#|NAME|#$hostname#g" \
-e "s#|WORKGROUP|#$workgroup#g" \
@ -56,43 +58,24 @@ smb_header()
smb_add_share()
{
local name
local path
local comment
local users
local create_mask
local dir_mask
local browseable
local read_only
local writeable
local guest_ok
local force_root
local write_list
local read_list
local hide_dot_files
local veto_files
local inherit_owner
local force_create_mode
local force_directory_mode
config_get name $1 name
config_get path $1 path
config_get comment $1 comment
config_get users $1 users
config_get create_mask $1 create_mask
config_get dir_mask $1 dir_mask
config_get browseable $1 browseable
config_get read_only $1 read_only
config_get writeable $1 writeable
config_get guest_ok $1 guest_ok
config_get_bool force_root $1 force_root 0
config_get write_list $1 write_list
config_get read_list $1 read_list
config_get hide_dot_files $1 hide_dot_files
config_get veto_files $1 veto_files
config_get inherit_owner $1 inherit_owner
config_get force_create_mode $1 force_create_mode
config_get force_directory_mode $1 force_directory_mode
config_get_sane name "$1" name
config_get_sane path "$1" path
config_get_sane comment "$1" comment
config_get_sane users "$1" users
config_get_sane create_mask "$1" create_mask
config_get_sane dir_mask "$1" dir_mask
config_get_sane browseable "$1" browseable
config_get_sane read_only "$1" read_only
config_get_sane writeable "$1" writeable
config_get_sane guest_ok "$1" guest_ok
config_get_bool force_root "$1" force_root 0
config_get_sane write_list "$1" write_list
config_get_sane read_list "$1" read_list
config_get_sane hide_dot_files "$1" hide_dot_files
config_get_sane veto_files "$1" veto_files
config_get_sane inherit_owner "$1" inherit_owner
config_get_sane force_create_mode "$1" force_create_mode
config_get_sane force_directory_mode "$1" force_directory_mode
[ -z "$name" ] || [ -z "$path" ] && return
@ -142,9 +125,8 @@ service_triggers()
procd_add_reload_trigger "dhcp" "system" "ksmbd"
local i
for i in $SMBD_IFACE; do
procd_add_reload_interface_trigger $i
procd_add_reload_interface_trigger "$i"
done
}