[tor-bugs] #20484 [Core Tor/Tor]: HiddenServiceDir must already exist when making a Single Onion Service

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Nov 4 07:27:29 UTC 2016


#20484: HiddenServiceDir must already exist when making a Single Onion Service
----------------------------------+------------------------------------
 Reporter:  pastly                |          Owner:
     Type:  defect                |         Status:  needs_review
 Priority:  Medium                |      Milestone:  Tor: 0.2.9.x-final
Component:  Core Tor/Tor          |        Version:  Tor: 0.2.9.3-alpha
 Severity:  Normal                |     Resolution:
 Keywords:  tor-hs, single-onion  |  Actual Points:  0.5
Parent ID:                        |         Points:  0.2
 Reviewer:                        |        Sponsor:
----------------------------------+------------------------------------
Changes (by teor):

 * status:  needs_revision => needs_review


Comment:

 There is some new code and some refactoring in bug20484_029, but it's
 mainly to do with testing. Still, I'd like it reviewed.

 Replying to [comment:12 dgoulet]:
 > Question: Why don't we try to create the directory in
 `rend_config_services()` (for each service that your patch does) instead
 of in `rend_service_load_all_keys()` which is called much later in
 config.c. Basically, I think if we do ask for creation when configuring
 the services, we then have no need for it in the load keys function. I did
 the test and works well.

 Turns out this is possible, but requires a few more changes than you might
 expect.
 2579d1d Create HS directories in rend_config_services, then check before
 use

 I left the directory checks in those functions, but made them check-only
 (not create). It's a BUG if we get that far without having directories
 created.

 I also found #20559 in the process, which I think we want to fix,
 particularly if people are going to switch between hidden services and
 single onion services:
 428ee66 Stop ignoring misconfigured hidden services

 Then finally, the new directory creation code means updated unit tests:
 f37d3ed Update unit tests for 20484, 20529, 20559

 And I almost forgot:
 f702253 Add onion_service_non_anonymous file to man page

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20484#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list