From 0ac91ffd59a2480783830eab52d0a5a9e0111e1c Mon Sep 17 00:00:00 2001 From: ajacoutot <> Date: Sat, 11 Dec 2010 10:15:23 +0000 Subject: [PATCH] Sanitise daemon_flags: remove multiple whitespaces from _rcflags. requested by okan@, ok robert@ --- src/etc/rc.d/rc.subr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/etc/rc.d/rc.subr b/src/etc/rc.d/rc.subr index 7819c03c..128559c6 100644 --- a/src/etc/rc.d/rc.subr +++ b/src/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.10 2010/12/11 09:55:37 robert Exp $ +# $OpenBSD: rc.subr,v 1.11 2010/12/11 10:15:23 ajacoutot Exp $ [ -z "${local_rcconf}" ] && . /etc/rc.conf @@ -38,6 +38,7 @@ rc_cmd() { rc_err "$0: need root privileges" [ -n "${daemon}" ] || rc_err "$0: daemon is not set" [ -n "${_rcflags}" ] && daemon_flags=${_rcflags} + [ -n "${_rcflags}" ] && daemon_flags=`echo ${_rcflags} | tr -s "[:space:]"` [ -n "${_rcuser}" ] && daemon_user=${_rcuser} [ -n "${_rcclass}" ] && daemon_class=${_rcclass} [ -n "${_rcshell}" ] && daemon_shell=${_rcshell}