[tor-bugs] #1922 [Tor]: torrc.d-style configuration directories
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Oct 1 17:04:48 UTC 2015
#1922: torrc.d-style configuration directories
-----------------------------+--------------------------------
Reporter: aa138346 | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: Tor: 0.2.8.x-final
Component: Tor | Version:
Resolution: | Keywords: tor-client
Actual Points: | Parent ID:
Points: medium | Sponsor:
-----------------------------+--------------------------------
Comment (by nickm):
Here's how to implement it:
Main:
* In config_get_lines(), add a recursive call to config_get_lines
whenever it sees a line where `k` is %include. Add the returned items to
the end of the list that's getting built.
* Add a recursionlevel argument to config_get_lines(). When you call
config_get_lines from inside config_get_lines, call it with a
recursionlevel one level higher. If the recursionlevel is >= 32, return
an error.
Controller-side:
* Set a flag in the or_options_t somehow to say whether %include was
used.
* If the flag is true, then in handle_control_saveconf(), refuse to save
unless there is an extra item in the arguments to saveconf, and that
argument is true.
* Make a new entry in getinfo_helper_misc() to handle a "config-can-
saveconf". Make it yield "1" if saveconf would work and 0 otherwise.
* Add config-can-saveconf to getinfo_items.
Documentation:
* Describe this all in tor.1.txt.in
* Describe the controller parts in control-spec.txt
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1922#comment:54>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list