diff options
author | Rosen Penev <rosenp@gmail.com> | 2019-08-31 18:50:48 -0700 |
---|---|---|
committer | Stijn Tintel <stijn@linux-ipv6.be> | 2020-05-08 03:32:52 +0300 |
commit | 73fa1aba94f5cf566007ac18cee3ef08b3ae64bc (patch) | |
tree | 12d94da20915031cd34260409e6355c8e05b66b7 /package/network/services/samba36/files | |
parent | 79da9d78b98e1cd4574a37e2c4c5f8315b91563d (diff) | |
download | upstream-73fa1aba94f5cf566007ac18cee3ef08b3ae64bc.tar.gz upstream-73fa1aba94f5cf566007ac18cee3ef08b3ae64bc.tar.bz2 upstream-73fa1aba94f5cf566007ac18cee3ef08b3ae64bc.zip |
samba36: Remove
Samba 3.6 is completely unsupported, in addition to having tons of patches
It also causes kernel panics on some platforms when sendfile is enabled.
Example:
https://github.com/gnubee-git/GnuBee_Docs/issues/45
I have reproduced on ramips as well as mvebu in the past.
Samba 4 is an alternative available in the packages repo.
cifsd is a lightweight alternative available in the packages repo. It is
also a faster alternative to both Samba versions (lower CPU usage). It
was renamed to ksmbd.
To summarize, here are the alternatives:
- ksmbd + luci-app-cifsd
- samba4 + luci-app-samba4
Signed-off-by: Rosen Penev <rosenp@gmail.com>
[drop samba36-server from GEMINI_NAS_PACKAGES, ksmbd rename + summary]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Diffstat (limited to 'package/network/services/samba36/files')
4 files changed, 0 insertions, 205 deletions
diff --git a/package/network/services/samba36/files/samba.config b/package/network/services/samba36/files/samba.config deleted file mode 100644 index c79db0d322..0000000000 --- a/package/network/services/samba36/files/samba.config +++ /dev/null @@ -1,6 +0,0 @@ -config samba - option 'name' 'OpenWrt' - option 'workgroup' 'WORKGROUP' - option 'description' 'OpenWrt' - option 'homes' '1' - diff --git a/package/network/services/samba36/files/samba.hotplug b/package/network/services/samba36/files/samba.hotplug deleted file mode 100644 index abb4346af0..0000000000 --- a/package/network/services/samba36/files/samba.hotplug +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh - -. /usr/share/libubox/jshn.sh - -device_get_vars() { - json_init - json_load "$(ubus call block info)" - - json_select devices || return 1 - - json_get_keys keys - for key in $keys - do - json_select $key - - json_get_var device device - [ "$device" = "$1" ] && { - shift - json_get_vars $@ - json_select .. - json_select .. - return 0 - } - - json_select .. - done - - json_select .. - - return 2 -} - -[ -f /var/run/config/samba ] || { - mkdir -p /var/run/config && touch /var/run/config/samba -} - -[ "$ACTION" = "add" ] && { - device_get_vars $DEVICE label mount || { - logger -t samba-hotplug "Failed to get $DEVICE info" - exit 1 - } - [ -n "$mount" ] && { - uci -c /var/run/config batch <<-EOF - set samba.$DEVICE="sambashare" - set samba.$DEVICE.name="$label" - set samba.$DEVICE.path="$mount" - set samba.$DEVICE.browseable="yes" - set samba.$DEVICE.read_only="yes" - set samba.$DEVICE.guest_ok="yes" - commit samba - EOF - /etc/init.d/samba reload - } -} - -[ "$ACTION" = "remove" ] && { - uci -c /var/run/config batch <<-EOF - delete samba.$DEVICE - commit samba - EOF - /etc/init.d/samba reload -} diff --git a/package/network/services/samba36/files/samba.init b/package/network/services/samba36/files/samba.init deleted file mode 100755 index abe8e8f5c7..0000000000 --- a/package/network/services/samba36/files/samba.init +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2008-2012 OpenWrt.org - -START=60 -USE_PROCD=1 - -smb_header() { - config_get samba_iface $1 interface "loopback lan" - - # resolve interfaces - local interfaces=$( - . /lib/functions/network.sh - - local net - for net in $samba_iface; do - local device - network_is_up $net || continue - network_get_device device "$net" - echo -n "${device:-$net} " - done - ) - - local name workgroup description charset - local hostname="$(uci_get system.@system[0].hostname)" - - config_get name $1 name "${hostname:-OpenWrt}" - config_get workgroup $1 workgroup "${hostname:-OpenWrt}" - config_get description $1 description "Samba on ${hostname:-OpenWrt}" - config_get charset $1 charset "UTF-8" - - mkdir -p /var/etc - sed -e "s#|NAME|#$name#g" \ - -e "s#|WORKGROUP|#$workgroup#g" \ - -e "s#|DESCRIPTION|#$description#g" \ - -e "s#|INTERFACES|#$interfaces#g" \ - -e "s#|CHARSET|#$charset#g" \ - /etc/samba/smb.conf.template > /var/etc/smb.conf - - local homes - config_get_bool homes $1 homes 0 - [ $homes -gt 0 ] && { - cat <<EOT >> /var/etc/smb.conf - -[homes] - comment = Home Directories - browsable = no - read only = no - create mode = 0750 -EOT - } - - [ -L /etc/samba/smb.conf ] || ln -nsf /var/etc/smb.conf /etc/samba/smb.conf -} - -smb_add_share() { - local name - local path - local users - local read_only - local guest_ok - local create_mask - local dir_mask - local browseable - - config_get name $1 name - config_get path $1 path - config_get users $1 users - config_get read_only $1 read_only - config_get guest_ok $1 guest_ok - config_get create_mask $1 create_mask - config_get dir_mask $1 dir_mask - config_get browseable $1 browseable - - [ -z "$name" -o -z "$path" ] && return - - echo -e "\n[$name]\n\tpath = $path" >> /var/etc/smb.conf - [ -n "$users" ] && echo -e "\tvalid users = $users" >> /var/etc/smb.conf - [ -n "$read_only" ] && echo -e "\tread only = $read_only" >> /var/etc/smb.conf - [ -n "$guest_ok" ] && echo -e "\tguest ok = $guest_ok" >> /var/etc/smb.conf - [ -n "$create_mask" ] && echo -e "\tcreate mask = $create_mask" >> /var/etc/smb.conf - [ -n "$dir_mask" ] && echo -e "\tdirectory mask = $dir_mask" >> /var/etc/smb.conf - [ -n "$browseable" ] && echo -e "\tbrowseable = $browseable" >> /var/etc/smb.conf -} - -init_config() { - config_load samba - CONFIG_APPEND=1 UCI_CONFIG_DIR=/var/run/config config_load samba - - config_foreach smb_header samba - config_foreach smb_add_share sambashare -} - -service_triggers() { - procd_add_reload_trigger samba - - local i - for i in $samba_iface; do - procd_add_reload_interface_trigger $i - done -} - -start_service() { - init_config - - procd_open_instance - procd_add_mdns "smb" "tcp" "445" - procd_set_param command /usr/sbin/smbd -F - procd_set_param respawn - procd_set_param file /var/etc/smb.conf - procd_close_instance - - procd_open_instance - procd_set_param command /usr/sbin/nmbd -F - procd_set_param respawn - procd_set_param file /var/etc/smb.conf - procd_close_instance -} diff --git a/package/network/services/samba36/files/smb.conf.template b/package/network/services/samba36/files/smb.conf.template deleted file mode 100644 index fc72f9258c..0000000000 --- a/package/network/services/samba36/files/smb.conf.template +++ /dev/null @@ -1,20 +0,0 @@ -[global] - netbios name = |NAME| - display charset = |CHARSET| - interfaces = |INTERFACES| - server string = |DESCRIPTION| - unix charset = |CHARSET| - workgroup = |WORKGROUP| - bind interfaces only = yes - deadtime = 30 - enable core files = no - invalid users = root - local master = no - map to guest = Bad User - max protocol = SMB2 - min receivefile size = 16384 - null passwords = yes - passdb backend = smbpasswd - security = user - smb passwd file = /etc/samba/smbpasswd - use sendfile = yes |