mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-02 20:16:59 +00:00
dropbear: 'rsakeyfile' -> 'keyfile' transition
end users should have done this since OpenWrt 19.07. if they didn't do this yet - perform auto-transition. schedule 'rsakeyfile' removal for next year release. Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
This commit is contained in:
parent
ff1ccd85e8
commit
a97e0dad6e
@ -168,13 +168,16 @@ dropbear_instance()
|
|||||||
[ -n "${ForceCommand}" ] && procd_append_param command -c "${ForceCommand}"
|
[ -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
|
||||||
|
config_list_foreach "$1" 'keyfile' hk_config__keyfile
|
||||||
if [ -n "${rsakeyfile}" ]; then
|
if [ -n "${rsakeyfile}" ]; then
|
||||||
logger -t ${NAME} -p daemon.warn \
|
logger -s -t "${NAME}" -p daemon.crit \
|
||||||
"option 'rsakeyfile' is considered to be deprecated and" \
|
"Option 'rsakeyfile' is considered to be DEPRECATED and will be REMOVED in future releases, use 'keyfile' list instead"
|
||||||
"will be removed in future releases, use 'keyfile' instead"
|
sed -i.before-upgrade -E -e 's/option(\s+)rsakeyfile/list keyfile/' \
|
||||||
|
"/etc/config/${NAME}"
|
||||||
|
logger -s -t "${NAME}" -p daemon.crit \
|
||||||
|
"Auto-transition 'option rsakeyfile' => 'list keyfile' in /etc/config/${NAME} is done, please verify your configuration"
|
||||||
hk_config 'rsakeyfile' "${rsakeyfile}"
|
hk_config 'rsakeyfile' "${rsakeyfile}"
|
||||||
fi
|
fi
|
||||||
config_list_foreach "$1" "keyfile" hk_config__keyfile
|
|
||||||
[ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
|
[ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}"
|
||||||
append_ports "${ipaddrs}" "${Port}"
|
append_ports "${ipaddrs}" "${Port}"
|
||||||
[ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
|
[ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}"
|
||||||
|
Loading…
Reference in New Issue
Block a user