From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Nov 23 13:20:01 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA3D81065672 for ; Sun, 23 Nov 2008 13:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BE17D8FC1B for ; Sun, 23 Nov 2008 13:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mANDK12u091536 for ; Sun, 23 Nov 2008 13:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mANDK17B091535; Sun, 23 Nov 2008 13:20:01 GMT (envelope-from gnats) Resent-Date: Sun, 23 Nov 2008 13:20:01 GMT Resent-Message-Id: <200811231320.mANDK17B091535@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, Daniel Walter Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41BCC1065672 for ; Sun, 23 Nov 2008 13:17:43 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 378688FC0A for ; Sun, 23 Nov 2008 13:17:43 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mANDHgCD042933 for ; Sun, 23 Nov 2008 13:17:42 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mANDHg6g042932; Sun, 23 Nov 2008 13:17:42 GMT (envelope-from nobody) Message-Id: <200811231317.mANDHg6g042932@www.freebsd.org> Date: Sun, 23 Nov 2008 13:17:42 GMT From: Daniel Walter To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/129083: [security/tor] tor rc file is wrong for current tor 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: Sun, 23 Nov 2008 13:20:02 -0000 >Number: 129083 >Category: ports >Synopsis: [security/tor] tor rc file is wrong for current tor >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 23 13:20:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Daniel Walter >Release: 6.3 >Organization: >Environment: FreeBSD www.0x90.at 6.3-STABLE FreeBSD 6.3-STABLE #1: Mon Apr 7 17:11:29 CEST 2008 root@www.0x90.at:/usr/obj/usr/src/sys/0x90 i386 >Description: tor rc script drops privileges before starting tor, since tor uses a new setuid/ setgid mechanism it must be started either as root or without the --User option >How-To-Repeat: upgrade tor tor-v0.2.32 try to start tor via /usr/local/etc/rc.d/tor start >Fix: There are two possible fixes for it: 1) start tor as root and specify the tor user --- tor.orig 2008-11-23 14:18:26.000000000 +0100 +++ tor 2008-11-23 14:18:52.000000000 +0100 @@ -29,8 +29,6 @@ : ${tor_enable="NO"} : ${tor_conf="/usr/local/etc/tor/torrc"} -: ${tor_user="_tor"} -: ${tor_group="_tor"} : ${tor_pidfile="/var/run/tor/tor.pid"} : ${tor_logfile="/var/log/tor"} : ${tor_datadir="/var/db/tor"} @@ -39,7 +37,7 @@ required_dirs=${tor_datadir} pidfile=${tor_pidfile} command="/usr/local/bin/${name}" -command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --User ${tor_user} --Group ${tor_group} --Log notice\ file\ ${tor_logfile}" +command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --User _tor --Log notice\ file\ ${tor_logfile}" extra_commands="log" log_cmd="${name}_log" 2) remove User and Group options and start tor as user _tor --- tor.orig 2008-11-23 14:18:26.000000000 +0100 +++ tor 2008-11-23 14:19:30.000000000 +0100 @@ -39,7 +39,7 @@ required_dirs=${tor_datadir} pidfile=${tor_pidfile} command="/usr/local/bin/${name}" -command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --User ${tor_user} --Group ${tor_group} --Log notice\ file\ ${tor_logfile}" +command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --Log notice\ file\ ${tor_logfile}" extra_commands="log" log_cmd="${name}_log" >Release-Note: >Audit-Trail: >Unformatted: