[openwrt/openwrt] dropbear: add ForceCommand uci option
LEDE Commits
lede-commits at lists.infradead.org
Sat May 20 14:26:06 PDT 2023
chunkeey pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d728d05c6cfe2c9071cc9fbe3edc5342ae8979a7
commit d728d05c6cfe2c9071cc9fbe3edc5342ae8979a7
Author: Nozomi Miyamori <inspc43313 at yahoo.co.jp>
AuthorDate: Wed Mar 29 21:15:13 2023 +0900
dropbear: add ForceCommand uci option
adds ForceCommand option. If the command is specified,
it forces users to execute the command when they log in.
Signed-off-by: Nozomi Miyamori <inspc43313 at yahoo.co.jp>
Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
package/network/services/dropbear/files/dropbear.init | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init
index ea4cad2a8d..b82e967cbc 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -119,6 +119,7 @@ validate_section_dropbear()
'enable:bool:1' \
'Interface:string' \
'GatewayPorts:bool:0' \
+ 'ForceCommand:string' \
'RootPasswordAuth:bool:1' \
'RootLogin:bool:1' \
'rsakeyfile:file' \
@@ -158,6 +159,7 @@ dropbear_instance()
procd_set_param command "$PROG" -F -P "$pid_file"
[ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
[ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
+ [ -n "${ForceCommand}" ] && procd_append_param command -c "${ForceCommand}"
[ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
[ "${RootLogin}" -eq 0 ] && procd_append_param command -w
if [ -n "${rsakeyfile}" ]; then
More information about the lede-commits
mailing list