1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-02 08:42:48 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=307402

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"
}