svn commit: r244842 - projects/portbuild/etc/rc.d
Mark Linimon
linimon at FreeBSD.org
Sun Dec 30 00:25:16 UTC 2012
Author: linimon (doc,ports committer)
Date: Sun Dec 30 00:25:15 2012
New Revision: 244842
URL: http://svnweb.freebsd.org/changeset/base/244842
Log:
Continue the process of weaning these things off uid root. buildproxy, by
definition, still runs as root, but its whole existance is in the crosshairs.
Modified:
projects/portbuild/etc/rc.d/buildproxy
projects/portbuild/etc/rc.d/pollmachine
projects/portbuild/etc/rc.d/qmanager
Modified: projects/portbuild/etc/rc.d/buildproxy
==============================================================================
--- projects/portbuild/etc/rc.d/buildproxy Sun Dec 30 00:23:11 2012 (r244841)
+++ projects/portbuild/etc/rc.d/buildproxy Sun Dec 30 00:25:15 2012 (r244842)
@@ -1,4 +1,7 @@
#!/bin/sh
+#
+# installed by the portbuild application
+#
export PATH=/usr/local/bin:${PATH}
pb=/var/portbuild
Modified: projects/portbuild/etc/rc.d/pollmachine
==============================================================================
--- projects/portbuild/etc/rc.d/pollmachine Sun Dec 30 00:23:11 2012 (r244841)
+++ projects/portbuild/etc/rc.d/pollmachine Sun Dec 30 00:25:15 2012 (r244842)
@@ -1,4 +1,7 @@
#!/bin/sh
+#
+# installed by the portbuild application
+#
export PATH=/usr/local/bin:${PATH}
pb=/var/portbuild
@@ -8,6 +11,10 @@ if [ ! -f ${config_file} ]; then
echo "$0: ${config_file} must exist!"
exit 1
fi
+if [ -z "${PORTBUILD_USER}" ]; then
+ echo "$0: You must define PORTBUILD_USER in ${config_file}."
+ exit 1
+fi
. ${config_file}
@@ -17,7 +24,7 @@ case $1 in
if [ -x $s ]; then
running=`ps ax | grep -v grep | grep $s`
if [ -z "${running}" ]; then
- ${s} -daemon ${SUPPORTED_ARCHS} &
+ su - ${PORTBUILD_USER} -c "${s} -daemon ${SUPPORTED_ARCHS}" &
echo -n ' pollmachine'
else
echo "pollmachine already running"
Modified: projects/portbuild/etc/rc.d/qmanager
==============================================================================
--- projects/portbuild/etc/rc.d/qmanager Sun Dec 30 00:23:11 2012 (r244841)
+++ projects/portbuild/etc/rc.d/qmanager Sun Dec 30 00:25:15 2012 (r244842)
@@ -1,4 +1,7 @@
#!/bin/sh
+#
+# installed by the portbuild application
+#
export PATH=/usr/local/bin:${PATH}
pb=/var/portbuild
@@ -8,6 +11,10 @@ if [ ! -f ${config_file} ]; then
echo "$0: ${config_file} must exist!"
exit 1
fi
+if [ -z "${PORTBUILD_USER}" ]; then
+ echo "$0: You must define PORTBUILD_USER in ${config_file}."
+ exit 1
+fi
. ${config_file}
@@ -17,7 +24,7 @@ case $1 in
if [ -x $s ]; then
running=`ps ax | grep -v grep | grep $s`
if [ -z "${running}" ]; then
- ${s} &
+ su - ${PORTBUILD_USER} -c "${s}" &
echo -n ' qmanager'
else
echo "qmanager already running"
More information about the svn-src-projects
mailing list