[tor-bugs] #20906 [Core Tor/Tor]: SocksPorts and ControlPorts should be stored in a set, not a list

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Dec 6 20:43:37 UTC 2016


#20906: SocksPorts and ControlPorts should be stored in a set, not a list
---------------------------------+-----------------
     Reporter:  arthuredelstein  |      Owner:
         Type:  defect           |     Status:  new
     Priority:  Medium           |  Milestone:
    Component:  Core Tor/Tor     |    Version:
     Severity:  Normal           |   Keywords:
Actual Points:                   |  Parent ID:
       Points:                   |   Reviewer:
      Sponsor:                   |
---------------------------------+-----------------
 When using domain sockets, Tor Launcher needs to launch tor with a
 specific unix-domain SocksPort. The SocksPort is initially not in the
 torrc file (as the full path is not known before installation), so Tor
 Launcher passes the SocksPort setting in to the tor process via the tor
 command line.

 Tor Launcher also calls `saveconfig` later in the session, such that the
 SocksPort will be saved to the torrc. So the next time Tor Launcher
 launches, passing the SocksPort to the command line is a duplicate of the
 previous SocksPort, now loaded in from the torrc. Tor then shows an error.

 For an example, see ticket:20761#comment:11. More background is in #20761
 as well.

 I think a solution to this would be for tor to store SocksPorts (and
 similarly, ControlPorts) in a set rather than a list. So if the command
 line or a torrc or a `setconf` invocation specifies a redundant SocksPort
 setting, no error is thrown but the redundant setting is gracefully
 ignored. And only a single copy of a given SocksPort setting should be
 saved to the torrc when `saveconfig` is invoked.

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


More information about the tor-bugs mailing list