Guard against bad service name argument(s) to load_rc_config()

MFC after:	3 days
X-MFC-to:	stable/11 stable/10
This commit is contained in:
Devin Teske 2016-10-16 20:59:28 +00:00
parent 6a4985f61c
commit bd8d6400f7

View File

@ -256,7 +256,9 @@ f_sysrc_service_configs()
last_name=
print_name() {
local name="$1"
[ "$name" = "$last_name" ] && return
case "$name" in
""|.|..|*/*|"$last_name") return ;;
esac
echo "$name" >&9
last_name="$name"
}