summaryrefslogtreecommitdiff
path: root/package/network/services/dropbear
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2017-06-27 22:30:01 +0200
committerJo-Philipp Wich <jo@mein.io>2017-12-13 16:23:38 +0100
commitd413c75d24f9fe231b992c47b1367b095f4571fc (patch)
tree9675be1e63118e2a051f2fbced675f368fe03b14 /package/network/services/dropbear
parent8693ab51528b5dbf130ecfb8cb827b2ba490caee (diff)
downloadmtk-20170518-d413c75d24f9fe231b992c47b1367b095f4571fc.zip
mtk-20170518-d413c75d24f9fe231b992c47b1367b095f4571fc.tar.gz
mtk-20170518-d413c75d24f9fe231b992c47b1367b095f4571fc.tar.bz2
dropbear: add option to set max auth tries
Add a uci option to set the new max auth tries paramater in dropbear. Set the default to 3, as 10 seems excessive. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> (cherry picked from commit 6371159b4ae8b4dd94d6319ac805b0c26962bb14)
Diffstat (limited to 'package/network/services/dropbear')
-rw-r--r--package/network/services/dropbear/Makefile2
-rwxr-xr-xpackage/network/services/dropbear/files/dropbear.init4
2 files changed, 4 insertions, 2 deletions
diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index 05df1bc..7302db2 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dropbear
PKG_VERSION:=2017.75
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:= \
diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init
index 2d23ebd..3d8cb2c 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -41,6 +41,7 @@ validate_section_dropbear()
'Port:list(port):22' \
'SSHKeepAlive:uinteger:300' \
'IdleTimeout:uinteger:0' \
+ 'MaxAuthTries:uinteger:3' \
'mdns:bool:1'
}
@@ -49,7 +50,7 @@ dropbear_instance()
local PasswordAuth enable Interface GatewayPorts \
RootPasswordAuth RootLogin rsakeyfile \
BannerFile Port SSHKeepAlive IdleTimeout \
- mdns ipaddrs
+ MaxAuthTries mdns ipaddrs
validate_section_dropbear "${1}" || {
echo "validation failed"
@@ -78,6 +79,7 @@ dropbear_instance()
append_ports "${ipaddrs}" "${Port}"
[ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
[ "${SSHKeepAlive}" -ne 0 ] && procd_append_param command -K "${SSHKeepAlive}"
+ [ "${MaxAuthTries}" -ne 0 ] && procd_append_param command -T "${MaxAuthTries}"
[ "${mdns}" -ne 0 ] && procd_add_mdns "ssh" "tcp" "$Port" "daemon=dropbear"
procd_set_param respawn
procd_close_instance