diff options
author | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2016-09-07 13:13:14 +0000 |
---|---|---|
committer | Antoine Jacoutot <ajacoutot@cvs.openbsd.org> | 2016-09-07 13:13:14 +0000 |
commit | 325184e566d7e828d09756d44328740919763115 (patch) | |
tree | 511d80b04966011d044fea3b9eab7c95aeeea257 /usr.sbin | |
parent | eee2daec4de591050bec0d483bc969e90b8563dd (diff) |
Validate service names with _rc_check_name() from rc.subr.
ok sthen@ robert@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rcctl/rcctl.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rcctl/rcctl.sh b/usr.sbin/rcctl/rcctl.sh index 2fae9913047..ea64c078f86 100644 --- a/usr.sbin/rcctl/rcctl.sh +++ b/usr.sbin/rcctl/rcctl.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: rcctl.sh,v 1.104 2016/07/30 06:25:21 ajacoutot Exp $ +# $OpenBSD: rcctl.sh,v 1.105 2016/09/07 13:13:13 ajacoutot Exp $ # # Copyright (c) 2014, 2015 Antoine Jacoutot <ajacoutot@openbsd.org> # Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -139,7 +139,7 @@ rcconf_edit_end() svc_is_avail() { local _svc=$1 - [ -n "${_svc}" ] || return + _rc_check_name "${_svc}" || return [ -x "/etc/rc.d/${_svc}" ] && return svc_is_special ${_svc} |