svn commit: r307402 - head/usr.sbin/bsdconfig/share

Devin Teske dteske at FreeBSD.org
Sun Oct 16 20:59:29 UTC 2016


Author: dteske
Date: Sun Oct 16 20:59:28 2016
New Revision: 307402
URL: https://svnweb.freebsd.org/changeset/base/307402

Log:
  Guard against bad service name argument(s) to load_rc_config()
  
  MFC after:	3 days
  X-MFC-to:	stable/11 stable/10

Modified:
  head/usr.sbin/bsdconfig/share/sysrc.subr

Modified: head/usr.sbin/bsdconfig/share/sysrc.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/sysrc.subr	Sun Oct 16 19:50:10 2016	(r307401)
+++ head/usr.sbin/bsdconfig/share/sysrc.subr	Sun Oct 16 20:59:28 2016	(r307402)
@@ -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"
 			}


More information about the svn-src-head mailing list