Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-23 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:  closed
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  implemented
  tor-03-unspecified-201612  |  Actual Points:
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by cypherpunks):

 This is not the best place to ask such questions.

 The first released tor version with this feature is 0.3.1.1-alpha.
 As usual there will be alpha packages on deb.torproject.org

 If you want this feature _now_ you can use the nightly builds:
 https://deb.torproject.org/torproject.org/dists/tor-nightly-master-stretch

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-23 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:  closed
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  implemented
  tor-03-unspecified-201612  |  Actual Points:
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-
Changes (by iry):

 * cc: iry (added)


Comment:

 Thank you for the great work, everyone!

 I have been working on anon-connection-wizard which is a Python-clone of
 the Tor Launcher. The anon-connection-wizard needs to output the user's
 configuration into a torrc file. I would like to ask "when the Tor version
 supporting that feature will enter deb.torproject.org stretch repository"?

 This information will help me to decide whether I need a transitional
 approach before the feature is available. Thank you very much!

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-22 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:  closed
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  implemented
  tor-03-unspecified-201612  |  Actual Points:
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-
Changes (by nickm):

 * status:  reopened => closed
 * resolution:   => implemented


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-22 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  reopened
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by nickm):

 I think you're right there; it's not great, but let's reopen if needed, or
 open a new ticket if we come up with a better solution.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-20 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  reopened
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by Jigsaw52):

 Maybe the only problem is that my test is wrong. The tor manual states:
 "C-style escaped characters are allowed inside quoted values". This is
 annoying for Windows users but it already works this way with all the
 other options taking paths. I guess the simple solution is just removing
 the two lines on torrc_contants that test paths with quotes.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-20 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  reopened
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by Jigsaw52):

 I've identified the source of the problem:
 parse_config_line_from_str_verbose() calls unescape_string() when a
 configuration value starts with a quote. unescape_string() returns NULL
 for anything that is not a valid C escaped string, causing
 parse_config_line_from_str_verbose() to stop reading the configuration and
 return the error "Invalid escape sequence in quoted string".

 This problem is not specific to this feature. As it is currently
 implemented, the config parsing code assumes that any value enclosed by
 quotes is a valid C escaped string. If it is not, the configuration  will
 be invalid. Any configuration option that takes paths will have problems
 with paths containing backslashes that are enclosed in quotes.

 I'm unsure how to fix this. It is not feasible to make special cases for
 options that we know that take paths because the options parsing code is
 completely separate from the options validation code.

 Is there any option that actually benefits from allowing C escaped strings
 as values? I'm thinking that maybe this feature could be removed but that
 will cause backwards compatibility problems if someone decided to use it
 in their config files.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-20 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  reopened
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by Jigsaw52):

 I'm setting up a developing environment on Windows to test this better.
 Even if messing with escaping makes the test pass, I want to be sure this
 actually works as it should on Windows too.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-19 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  reopened
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by arma):

 I just closed #8108 as a duplicate of this ticket.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-19 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  reopened
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by nickm):

 13034e1574bf5e in the Tor master repository makes this work for me on
 Wine, and doesn't break it on Linux.  I'll see whether the Jenkins
 builders are happy.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-19 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  reopened
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by nickm):

 (remember, since parse_config_line_from_str_verbose() already calls
 unescape_string(), we have to use the fancier escaping for this to work.)

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-19 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  reopened
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by nickm):

 I've investigated with wine, and it's failing even on the first line,
 because this is the torrc_contents:
 {{{
 %include
 "C:\users\nickm\Temp\tor_test_8_cyicnwzs/test_include_path_syntax"
 %include C:\users\nickm\Temp\tor_test_8_cyicnwzs/test_include_path_syntax\
 %include
 "C:\users\nickm\Temp\tor_test_8_cyicnwzs/test_include_path_syntax\\"
 }}}

 I think one fix here is to escape the string.  I've got it working on
 windows, but now I need to test again on unix.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-19 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  reopened
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by Jigsaw52):

 I do not have time do debug this right now. I will look at it in a few
 hours. But just a guess: could it be that, on Windows, dir already ends
 with a backslash (get_fname returns it already with the backslash)?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-19 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  reopened
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-
Changes (by nickm):

 * status:  closed => reopened
 * resolution:  implemented =>


Comment:

 Okay, there's some other problem here too.
 https://jenkins.torproject.org/job/tor-ci-windows-commit/1298/console says
 that we're still failing on windows:
 {{{
 18:38:50 config/include_path_syntax:
 18:38:50   FAIL ../tor/src/test/test_config.c:5190:
 assert(config_get_lines_include(torrc_contents, , 0,_used)
 OP_EQ 0): -1 vs 0
 18:38:50   [include_path_syntax FAILED]
 }}}

 Any insights?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-19 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:  closed
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  implemented
  tor-03-unspecified-201612  |  Actual Points:
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by nickm):

 Oh, wait. Actually, there turns out to be a problem with the unit tests on
 Windows.  The issue is that parse_config_line_from_str_verbose() already
 _does_ look for strings that are surrounded by quotes, and processes them
 with unescape_string(). So I've tried to fix up the test behavior well
 enough for it to pass.  I suspect more fiddling will be needed, but right
 now I'm just waiting for the windows jenkins builders to complete

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-19 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:  closed
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  implemented
  tor-03-unspecified-201612  |  Actual Points:
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-
Changes (by nickm):

 * status:  needs_review => closed
 * resolution:   => implemented


Comment:

 Makes sense; merged it!  Thanks again!

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-18 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  needs_review
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by Jigsaw52):

 I don't think unescape_string() is a good function to unquote the paths
 because:
 1. C escape sequences will be unescaped. This is a problem on Windows,
 where a path like C:\tor would become C:or
 2. Backslashes need to be escaped. On Windows this would make paths a
 mess.
 3. A path ending with backslash (e.g.: "C:\Programs and
 Files\tor\torrc.d\") would cause problems too.

 That is why I created a new function. None of the unescaping functions I
 found would handle these cases well.

 You are correct about the leak. I fixed it. Thanks for finding it.

 I also added config-can-saveconf to the changes file.

 The new branch is here: https://github.com/Jigsaw52/tor/tree/torrc-dir-
 fix-1922_squashed2

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-18 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  needs_review
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by nickm):

 Also, I'm seeing a memory leak in the unit tests. I think the problem is
 that in config_get_file_list(), you need to free file_list using
 smartlist_free(), not tor_free()

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-18 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  needs_review
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by nickm):

 This is looking pretty good!  As for the quoting thing though -- do you
 think it would be okay to use "unescape_string()" instead, and avoid
 adding a new function? Please let me know what you think.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-15 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  needs_review
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-
Changes (by nickm):

 * milestone:  Tor: 0.3.2.x-final => Tor: 0.3.1.x-final


Comment:

 Pulling this back for consideration in 0.3.1, since the feature window
 isn't _quite_ closed yet. :)

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-15 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  needs_review
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.2.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-
Changes (by Jigsaw52):

 * status:  needs_revision => needs_review


Comment:

 I've fixed most of the issues. Comments below:

 1. I find my version easier to read but I changed it back for consistency
 sake since this pattern is used on other places too.

 2. Done.

 3. and 4. I agree with the suggestion to expose the two APIs for
 config_get_lines and I implemented it. config_get_lines_include processes
 includes while config_get_lines is the same as before.

 5. Done.

 6. Done.

 7. I don't understand this one. I sort the list right after the calling
 tor_listdir().

 8. I do not like the paths ending in /*  because it might mislead users
 into thinking the * wildcard will work for any pattern. However, I added
 tests to make sure ending the path with PATH_SEPARATOR is supported as it
 is any easy way to tell a directory and a regular file apart. I left
 automatic detection of file/directory.

 9. Added support for quoted paths. Added tests for it too.

 I've merged with the current master and squashed all my changes here:
 https://github.com/Jigsaw52/tor/tree/torrc-dir-fix-1922_squashed

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-09 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  needs_revision
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-
Changes (by nickm):

 * status:  needs_review => needs_revision


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-09 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  needs_review
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by nickm):

 7. For consistency, let's sort the output of tor_listdir().

 8. Maybe we shouldn't automatically detect directory vs file: instead, we
 should only load the configuration files in a directory if the string ends
 with /*

 9. Do we support quoted paths here? Maybe we should.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-05-09 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  needs_review
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by nickm):

 Looks like good solid work!  A few comments:

 1.
 {{{
 +  if (!list) {
 +list = included_list;
 +list_last = included_list_last;
 +  } else if (included_list) {
 +list_last->next = included_list;
 +list_last = included_list_last;
 +  }
 }}}

 This conditional isn't necessary -- look what we were doing with the
 "next" pointer in the old code.

 2. Can the code in the `if (!strcmp(k, "%include")) {` block be extracted
 into a new function?  It makes the config_get_lines_aux function huge, and
 it's logically fairly separate.

 3. There should probably be a flag to enable %include on specific files:
 we use config_get_lines() all over the place, and we don't necessarily
 want to allow includes in all of them.

 4. Maybe there should be two wrappers for config_get_lines_aux: one
 presenting the old API, and one presenting one the new API that allows
 includes and reports whether they have happened?  That way we could avoid
 changing all 22 places that call config_get_lines().

 5. This could be much shorter and safer with tor_asprintf.
 {{{
 +  size_t fullname_len = (size_t) (strlen(path) + strlen(f) + 2);
 +  char *fullname = tor_malloc_zero(fullname_len);
 +  strlcat(fullname, path, fullname_len);
 +  strlcat(fullname, PATH_SEPARATOR, fullname_len);
 +  strlcat(fullname, f, fullname_len);
 +  tor_free(f);
 }}}

 6. This could use a changes file; see doc/HACKING/CodingStandards.md for
 more info on those.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-04-14 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  needs_review
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by Jigsaw52):

 Some changes on the master branch introduced merge conflicts on my branch.
 Here is a branch with a currently merge-able version:
 https://github.com/Jigsaw52/tor/tree/torrc-dir-fix-1922_20170414

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-04-04 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  needs_review
 Priority:  Low  |  Milestone:  Tor:
 |  0.3.1.x-final
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-
Changes (by dgoulet):

 * priority:  High => Low
 * milestone:  Tor: unspecified => Tor: 0.3.1.x-final


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-04-03 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  assigned
 Priority:  High |  Milestone:  Tor:
 |  unspecified
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by Jigsaw52):

 I think it is ready.

 tor branch: https://github.com/Jigsaw52/tor/tree/torrc-dir-fix-1922
 torspec branch: https://github.com/Jigsaw52/torspec/tree/torrc-dir-
 fix-1922

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-04-03 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  needs_review
 Priority:  High |  Milestone:  Tor:
 |  unspecified
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-
Changes (by Jigsaw52):

 * status:  assigned => needs_review


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-03-13 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  assigned
 Priority:  High |  Milestone:  Tor:
 |  unspecified
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-

Comment (by teor):

 Thanks!
 Just a reminder that before we merge this feature, we'll want some unit
 tests for it.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2017-03-12 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
-+-
 Reporter:  aa138346 |  Owner:
 |  Jigsaw52
 Type:  enhancement  | Status:
 |  assigned
 Priority:  High |  Milestone:  Tor:
 |  unspecified
Component:  Core Tor/Tor |Version:
 Severity:  Normal   | Resolution:
 Keywords:  tor-client, intro,   |  Actual Points:
  tor-03-unspecified-201612  |
Parent ID:   | Points:  medium
 Reviewer:   |Sponsor:
-+-
Changes (by Jigsaw52):

 * owner:   => Jigsaw52
 * status:  new => assigned


Comment:

 I am going to try to add this feature.

 I have done some initial work to add support to include files on torrc.
 I will be using the following branch:
 [https://github.com/Jigsaw52/tor/tree/torrc-dir-fix-1922]

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2016-09-11 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
---+--
 Reporter:  aa138346   |  Owner:
 Type:  enhancement| Status:  new
 Priority:  High   |  Milestone:  Tor: 0.2.???
Component:  Core Tor/Tor   |Version:
 Severity:  Normal | Resolution:
 Keywords:  tor-client, intro  |  Actual Points:
Parent ID: | Points:  medium
 Reviewer: |Sponsor:
---+--
Changes (by pastly):

 * cc: sirmatt@… (added)


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2016-09-09 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
---+--
 Reporter:  aa138346   |  Owner:
 Type:  enhancement| Status:  new
 Priority:  High   |  Milestone:  Tor: 0.2.???
Component:  Core Tor/Tor   |Version:
 Severity:  Normal | Resolution:
 Keywords:  tor-client, intro  |  Actual Points:
Parent ID: | Points:  medium
 Reviewer: |Sponsor:
---+--
Changes (by Ralph):

 * cc: torproject.org@… (added)


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2016-08-26 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
---+--
 Reporter:  aa138346   |  Owner:
 Type:  enhancement| Status:  new
 Priority:  High   |  Milestone:  Tor: 0.2.???
Component:  Core Tor/Tor   |Version:
 Severity:  Normal | Resolution:
 Keywords:  tor-client, intro  |  Actual Points:
Parent ID: | Points:  medium
 Reviewer: |Sponsor:
---+--
Changes (by segfault):

 * cc: segfault@… (added)


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2016-07-01 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
---+--
 Reporter:  aa138346   |  Owner:
 Type:  enhancement| Status:  new
 Priority:  High   |  Milestone:  Tor: 0.2.???
Component:  Core Tor/Tor   |Version:
 Severity:  Normal | Resolution:
 Keywords:  tor-client, intro  |  Actual Points:
Parent ID: | Points:  medium
 Reviewer: |Sponsor:
---+--
Changes (by mrphs):

 * severity:  Blocker => Normal


Comment:

 Accidentally set to blocker. Sorry! Reverting back to normal.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #1922 [Core Tor/Tor]: torrc.d-style configuration directories

2016-07-01 Thread Tor Bug Tracker & Wiki
#1922: torrc.d-style configuration directories
---+--
 Reporter:  aa138346   |  Owner:
 Type:  enhancement| Status:  new
 Priority:  High   |  Milestone:  Tor: 0.2.???
Component:  Core Tor/Tor   |Version:
 Severity:  Blocker| Resolution:
 Keywords:  tor-client, intro  |  Actual Points:
Parent ID: | Points:  medium
 Reviewer: |Sponsor:
---+--
Changes (by mrphs):

 * cc: mrphs (added)
 * severity:   => Blocker


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs