Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 May 2012 11:11:10 GMT
From:      Fabian Keil <fk@fabiankeil.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/167482: security/tor-devel: Additional Log directives in config file ignored due to rc script
Message-ID:  <201205011111.q41BBAWo084160@red.freebsd.org>
Resent-Message-ID: <201205011120.q41BK78T049513@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         167482
>Category:       ports
>Synopsis:       security/tor-devel: Additional Log directives in config file ignored due to rc script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 01 11:20:07 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Fabian Keil
>Release:        HEAD
>Organization:
>Environment:
FreeBSD r500.local 10.0-CURRENT FreeBSD 10.0-CURRENT #424 r+1ac027d: Mon Apr 30 22:59:10 CEST 2012     fk@r500.local:/usr/obj/usr/src/sys/ZOEY  amd64

>Description:
As of security/tor-devel 0.2.3.9.a, additional log files specified in
torrc are overridden by the default rc script, due to a syntax change
made upstream. Quoting the ChangeLog:

| Changes in version 0.2.3.9-alpha - 2011-12-08
| [...]
| o Minor features (new/different config options):
| [...]
|    - Slightly change behavior of "list" options (that is, config
|      options that can appear more than once) when they appear both in
|      torrc and on the command line. Previously, the command-line options
|      would be appended to the ones from torrc. Now, the command-line
|      options override the torrc options entirely. This new behavior
|      allows the user to override list options (like exit policies and
|      ports to listen on) from the command line, rather than simply
|      appending to the list.
|    - You can get the old (appending) command-line behavior for "list"
|      options by prefixing the option name with a "+".

>How-To-Repeat:
Add a line like the following to /usr/local/etc/tor/torrc:
Log [app]debug info file /usr/local/var/log/tor/debug.log
restart tor, note that tor doesn't write to the file.
>Fix:
The attached patch adds the "+" to the list option, thus getting the previous behavior again.

The alternative would be to remove the --Log option completely, forcing the user to specify all log files in the torrc. As a user with multiple log files I would prefer that, but users with a single log file probably wouldn't.

Patch attached with submission follows:

--- .zfs/snapshot/2012-05-01_12:58/security/tor-devel/files/tor.in	2012-05-01 12:56:57.404278382 +0200
+++ security/tor-devel/files/tor.in	2012-05-01 12:59:07.042280697 +0200
@@ -37,7 +37,7 @@
 required_dirs=${tor_datadir}
 pidfile=${tor_pidfile}
 command="%%PREFIX%%/bin/${name}"
-command_args="-f ${tor_conf} --PidFile ${tor_pidfile} --RunAsDaemon 1 --DataDirectory ${tor_datadir} --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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205011111.q41BBAWo084160>