summaryrefslogtreecommitdiff
path: root/etc/rc.d
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2011-02-24 07:07:04 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2011-02-24 07:07:04 +0000
commit41d0d580855375b8cc6ec467fffa8daf75a806db (patch)
tree702ea8017c63b817d7cb3b256a1c1aa2cc6200db /etc/rc.d
parent57207e566d4544b2771030135b72de4f9d52c153 (diff)
Remove daemon_shell and force the use of /bin/sh for the su(1) call.
ok robert@ espie@ miod@
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/rc.subr7
1 files changed, 2 insertions, 5 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr
index bd47d97e469..5032dfbc869 100644
--- a/etc/rc.d/rc.subr
+++ b/etc/rc.d/rc.subr
@@ -1,4 +1,4 @@
-# $OpenBSD: rc.subr,v 1.19 2011/01/05 16:04:21 ajacoutot Exp $
+# $OpenBSD: rc.subr,v 1.20 2011/02/24 07:07:03 ajacoutot Exp $
rc_err() {
echo $1
@@ -61,20 +61,17 @@ rc_cmd() {
_name=`basename $0`
eval _rcflags=\${${_name}_flags}
-eval _rcshell=\${${_name}_shell}
eval _rcuser=\${${_name}_user}
getcap -f /etc/login.conf ${_name} 1>/dev/null 2>&1 && \
daemon_class=${_name}
[ -z "${daemon_class}" ] && daemon_class=daemon
-[ -z "${daemon_shell}" ] && daemon_shell=/bin/sh
[ -z "${daemon_user}" ] && daemon_user=root
[ -n "${_rcflags}" ] && daemon_flags=${_rcflags}
-[ -n "${_rcshell}" ] && daemon_shell=${_rcshell}
[ -n "${_rcuser}" ] && daemon_user=${_rcuser}
daemon_flags=`echo ${daemon_flags} | tr -s "[:space:]"`
pexp="${daemon}${daemon_flags:+ ${daemon_flags}}"
-rcexec="su -l -c ${daemon_class} -s ${daemon_shell} ${daemon_user} -c"
+rcexec="su -l -c ${daemon_class} -s /bin/sh ${daemon_user} -c"