From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Sep 18 15:40:24 2006 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 6ADAC16A417 for ; Mon, 18 Sep 2006 15:40:24 +0000 (UTC) (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 466F243D55 for ; Mon, 18 Sep 2006 15:40:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k8IFeNd3069975 for ; Mon, 18 Sep 2006 15:40:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k8IFeNre069974; Mon, 18 Sep 2006 15:40:23 GMT (envelope-from gnats) Resent-Date: Mon, 18 Sep 2006 15:40:23 GMT Resent-Message-Id: <200609181540.k8IFeNre069974@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Richard Bejtlich Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0912116A40F for ; Mon, 18 Sep 2006 15:38:54 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D99443D49 for ; Mon, 18 Sep 2006 15:38:53 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k8IFcrgG098219 for ; Mon, 18 Sep 2006 15:38:53 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k8IFcrSD098218; Mon, 18 Sep 2006 15:38:53 GMT (envelope-from nobody) Message-Id: <200609181538.k8IFcrSD098218@www.freebsd.org> Date: Mon, 18 Sep 2006 15:38:53 GMT From: Richard Bejtlich To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ports/103358: Broken Privoxy rc.d script X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2006 15:40:24 -0000 >Number: 103358 >Category: ports >Synopsis: Broken Privoxy rc.d script >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 18 15:40:22 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Richard Bejtlich >Release: 6.1 SECURITY >Organization: TaoSecurity >Environment: FreeBSD orr.taosecurity.com 6.1-SECURITY FreeBSD 6.1-SECURITY #0: Mon Aug 28 05:21:08 UTC 2006 root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: /usr/local/etc/rc.d/privoxy contains the following: su -m privoxy -c "${command} ${privoxy_flags} ${configfile} --pidfile ${pidfile}" \ This will not work. Running it from the command line shows why: orr:/root# su -m privoxy -c /usr/local/sbin/privoxy /usr/local/etc/privoxy/config --pidfile /var/run/privoxy/privoxy.pid Sep 18 11:33:26 Privoxy(134729728) Fatal error: can't check configuration file '/root/config': No such file or directory Sep 18 11:33:26 Privoxy(134729728) Fatal error: can't check configuration file '/root/config': No such file or directory >How-To-Repeat: Use the following Privoxy: orr:/root# pkg_info | grep priv privoxy-3.0.3_4 Privoxy is a web proxy with advanced filtering capabilities >Fix: Remove su -m: orr:/root# privoxy -c /usr/local/sbin/privoxy /usr/local/etc/privoxy/config --pidfile /var/run/privoxy/privoxy.pid Sep 18 11:33:40 Privoxy(134729728) Info: loading configuration file '/usr/local/etc/privoxy/config': orr:/root# sockstat -4 USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS root privoxy 39480 3 tcp4 127.0.0.1:8118 *:* richard ssh 691 3 tcp4 192.168.2.5:49499 172.16.3.2:22 root sendmail 468 4 tcp4 127.0.0.1:25 *:* root sshd 462 4 tcp4 *:22 *:* root syslogd 320 7 udp4 *:514 *:* orr:/usr/local/etc/rc.d# diff -u privoxy.orig privoxy --- privoxy.orig Mon Sep 18 11:37:52 2006 +++ privoxy Mon Sep 18 11:38:01 2006 @@ -30,7 +30,7 @@ echo "${name} is already running" else echo "Starting ${name}." - su -m privoxy -c "${command} ${privoxy_flags} ${configfile} --pidfile ${pidfile}" \ + privoxy -c "${command} ${privoxy_flags} ${configfile} --pidfile ${pidfile}" \ 1>/dev/null 2>&1 fi } Thank you! >Release-Note: >Audit-Trail: >Unformatted: