From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Nov 13 23:10:18 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D78216A41F for ; Sun, 13 Nov 2005 23:10:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DE8943D53 for ; Sun, 13 Nov 2005 23:10:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jADNAILj067154 for ; Sun, 13 Nov 2005 23:10:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jADNAIG5067153; Sun, 13 Nov 2005 23:10:18 GMT (envelope-from gnats) Date: Sun, 13 Nov 2005 23:10:18 GMT Message-Id: <200511132310.jADNAIG5067153@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Pav Lucistnik Cc: Subject: Re: ports/88602: privoxy poor defaults X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Pav Lucistnik List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2005 23:10:18 -0000 The following reply was made to PR ports/88602; it has been noted by GNATS. From: Pav Lucistnik To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/88602: privoxy poor defaults Date: Mon, 14 Nov 2005 00:03:03 +0100 Here is the patch from the originator: --- privoxy/Makefile Wed Mar 2 15:28:43 2005 +++ privoxy/Makefile Sun Nov 13 02:41:38 2005 @@ -48,6 +48,8 @@ pre-install: @${SED} -e 's,%%PREFIX%%,${PREFIX},g' \ ${PKGDIR}/pkg-message.in > ${PKGMESSAGE} + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ + ${PKGINSTALL} ${PKGNAME} PRE-INSTALL do-install: @${MKDIR} ${PREFIX}/etc/privoxy/templates @@ -67,5 +69,11 @@ post-install: ${INSTALL_SCRIPT} ${WRKSRC}/privoxy.sh ${PREFIX}/etc/rc.d/ @${CAT} ${PKGMESSAGE} + ${TOUCH} /var/log/privoxy + ${CHOWN} privoxy:privoxy /var/log/privoxy + ${CHMOD} 0640 /var/log/privoxy + ${TOUCH} /var/log/jarfile + ${CHOWN} privoxy:privoxy /var/log/jarfile + ${CHMOD} 0600 /var/log/jarfile .include --- privoxy/files/privoxy.sh.in Thu Feb 17 12:43:02 2005 +++ privoxy/files/privoxy.sh.in Sun Nov 13 02:34:08 2005 @@ -30,7 +30,7 @@ echo "${name} is already running" else echo "Starting ${name}." - ${command} ${privoxy_flags} ${configfile} --pidfile ${pidfile} \ + su -m privoxy -c '${command} ${privoxy_flags} ${configfile} --pidfile ${pidfile}' \ 1>/dev/null 2>&1 fi } --- privoxy/pkg-install Wed Dec 31 20:00:00 1969 +++ privoxy/pkg-install Sun Nov 13 02:36:35 2005 @@ -0,0 +1,33 @@ +#!/bin/sh + +if [ "$2" != "PRE-INSTALL" ]; then + exit 0 +fi + +PW=/usr/sbin/pw +ECHO=echo +USER=privoxy +GROUP=${USER} +UIDGID=201 + +if ! ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then + if ${PW} groupadd ${GROUP} -g ${UIDGID}; then + ${ECHO} "Added group \"${GROUP}\"." + else + ${ECHO} "Adding group \"${GROUP}\" failed..." + exit 1 + fi +fi + +if ! ${PW} usershow "${USER}" 2>/dev/null 1>&2; then + if ${PW} useradd ${USER} -g ${GROUP} -h - \ + -s "/sbin/nologin" -d "/nonexistent" \ + -c "privoxy pseudo-user" -u ${UIDGID}; \ + then + ${ECHO} "Added user \"${USER}\"." + else + ${ECHO} "Adding user \"${USER}\" failed..." + exit 1 + fi +fi +exit 0 -- Pav Lucistnik It's time for the penguin on top of your television set to explode.