[tor-bugs] #1922 [Tor]: torrc.d-style configuration directories
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Aug 29 20:25:49 UTC 2013
#1922: torrc.d-style configuration directories
-----------------------------+------------------------------
Reporter: aa138346 | Owner:
Type: enhancement | Status: needs_revision
Priority: normal | Milestone: Tor: unspecified
Component: Tor | Version:
Resolution: | Keywords: tor-client
Actual Points: | Parent ID:
Points: |
-----------------------------+------------------------------
Comment (by proper):
Replying to [comment:13 nickm]:
> Some more fundamental issues
> * I thought that the semantics of options_init_from_string were that
it replaced the current configuration with cf_defaults+cf. But that
appears to means that, in this code, the original torrc file is completely
replaced with the first file in /etc/tor.d/, then by the second, then by
the third, and so on. (Is this tested?)
I did not mean, if /etc/tor.d/10_something contains "CookieAuthentication
1" and /etc/tor.d/20_somethingelse contains no line containing
"CookieAuthentication", that /etc/tor.d/10_something is completely
disregarded. The idea was that configuration fragments are joined together
in a predictable order. (Bao, please see above.)
> * It seems that for an ordinary Tor user, there's no way to override
this stuff. If the system has an /etc/tor.d, I can't override those
options even with "-f my_torrc", since the torrc is considered second, and
the /etc/tor.d contents are considered last. There is no way to override
that directory with another one, either. I don't think that can be the
right way to do it, can it?
This is a valid concern and no one considered that earlier. There is a
solution.
At the moment in the Tor manual (man tor), there is...
-f FILE
Specify a new configuration file to contain further Tor configuration
options. (Default: $HOME/.torrc, or /etc/tor/torrc if that file is not
found)
and...
--defaults-torrc FILE
Specify a file in which to find default values for Tor options. The
contents of this file are overridden by those in the regular configuration
file, and by those on the command line. (Default: /etc/tor/torrc-
defaults.)
I suggest adding..
--fragments FOLDER
Specify a folder to contain further Tor configuration file fragments.
(Default: $HOME/.tor.d, or /etc/tor.d/ if that file is not found)
This should allow an ordinary Tor user to override it.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1922#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list