From owner-svn-src-projects@FreeBSD.ORG Sun Dec 30 00:25:16 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 56F433FE; Sun, 30 Dec 2012 00:25:16 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 39E7F8FC08; Sun, 30 Dec 2012 00:25:16 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBU0PGq4081373; Sun, 30 Dec 2012 00:25:16 GMT (envelope-from linimon@svn.freebsd.org) Received: (from linimon@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBU0PFpd081367; Sun, 30 Dec 2012 00:25:15 GMT (envelope-from linimon@svn.freebsd.org) Message-Id: <201212300025.qBU0PFpd081367@svn.freebsd.org> From: Mark Linimon Date: Sun, 30 Dec 2012 00:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r244842 - projects/portbuild/etc/rc.d X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 00:25:16 -0000 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"