Browse Source

Quote $daemon_flags to prevent echo(1) picking them as input flags.

from Piotr Sikora
ok robert@
OPENBSD_5_0
ajacoutot 13 years ago
parent
commit
49f4d1d744
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/etc/rc.d/rc.subr

+ 2
- 2
src/etc/rc.d/rc.subr View File

@ -1,4 +1,4 @@
# $OpenBSD: rc.subr,v 1.30 2011/03/25 10:03:26 ajacoutot Exp $
# $OpenBSD: rc.subr,v 1.31 2011/04/05 11:47:32 ajacoutot Exp $
# Default functions and variables used by rc.d(8) scripts.
@ -116,6 +116,6 @@ getcap -f /etc/login.conf ${_name} 1>/dev/null 2>&1 && \
[ -n "${_rcflags}" ] && daemon_flags=${_rcflags}
[ -n "${_rcuser}" ] && daemon_user=${_rcuser}
daemon_flags=$(echo ${daemon_flags} | tr -s "[:space:]")
daemon_flags=$(echo "${daemon_flags}" | tr -s "[:space:]")
pexp="${daemon}${daemon_flags:+ ${daemon_flags}}"
rcexec="su -l -c ${daemon_class} -s /bin/sh ${daemon_user} -c"

Loading…
Cancel
Save