ports/129083: [security/tor] tor rc file is wrong for current tor
Daniel Walter
d.walter at 0x90.at
Sun Nov 23 13:20:02 UTC 2008
>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 at 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:
More information about the freebsd-ports-bugs
mailing list