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>
This commit is contained in:
parent
c191c2d46f
commit
d728d05c6c
1 changed files with 2 additions and 0 deletions
|
@ -119,6 +119,7 @@ validate_section_dropbear()
|
||||||
'enable:bool:1' \
|
'enable:bool:1' \
|
||||||
'Interface:string' \
|
'Interface:string' \
|
||||||
'GatewayPorts:bool:0' \
|
'GatewayPorts:bool:0' \
|
||||||
|
'ForceCommand:string' \
|
||||||
'RootPasswordAuth:bool:1' \
|
'RootPasswordAuth:bool:1' \
|
||||||
'RootLogin:bool:1' \
|
'RootLogin:bool:1' \
|
||||||
'rsakeyfile:file' \
|
'rsakeyfile:file' \
|
||||||
|
@ -158,6 +159,7 @@ dropbear_instance()
|
||||||
procd_set_param command "$PROG" -F -P "$pid_file"
|
procd_set_param command "$PROG" -F -P "$pid_file"
|
||||||
[ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
|
[ "${PasswordAuth}" -eq 0 ] && procd_append_param command -s
|
||||||
[ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
|
[ "${GatewayPorts}" -eq 1 ] && procd_append_param command -a
|
||||||
|
[ -n "${ForceCommand}" ] && procd_append_param command -c "${ForceCommand}"
|
||||||
[ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
|
[ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g
|
||||||
[ "${RootLogin}" -eq 0 ] && procd_append_param command -w
|
[ "${RootLogin}" -eq 0 ] && procd_append_param command -w
|
||||||
if [ -n "${rsakeyfile}" ]; then
|
if [ -n "${rsakeyfile}" ]; then
|
||||||
|
|
Loading…
Reference in a new issue