diff options
author | Nozomi Miyamori <inspc43313@yahoo.co.jp> | 2023-03-29 21:15:13 +0900 |
---|---|---|
committer | Christian Lamparter <chunkeey@gmail.com> | 2023-05-20 23:24:50 +0200 |
commit | d728d05c6cfe2c9071cc9fbe3edc5342ae8979a7 (patch) | |
tree | 85f3edbcc2c7a5e0597ea92bf035df9f52b1e55e | |
parent | c191c2d46f0080b8c6e6aee76b30ae9cf50d6e3e (diff) | |
download | upstream-d728d05c6cfe2c9071cc9fbe3edc5342ae8979a7.tar.gz upstream-d728d05c6cfe2c9071cc9fbe3edc5342ae8979a7.tar.bz2 upstream-d728d05c6cfe2c9071cc9fbe3edc5342ae8979a7.zip |
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@yahoo.co.jp>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
-rwxr-xr-x | package/network/services/dropbear/files/dropbear.init | 2 |
1 files changed, 2 insertions, 0 deletions
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 |