Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#4473 closed defect (wontfix)

Disallow ControlPort auto unless ControlPortWriteToFile also set?

Reported by: arma Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by arma)

If you set controlport auto but you don't set ControlPortWriteToFile, it works, but there's no (automated) way for controllers to find your control port.

A user in #tor just set up his Tor that way.

Should Tor demand that ControlPortWriteToFile is set when ControlPort auto is chosen? Or do we think the use case of "expert user looks at log file and configures controller by hand" outweighs the "user thinks he set it up right but didn't" failure mode?

This is a bug in 0.2.2.x too, but my initial guess is that we don't want to mess with 0.2.2.x here.

Child Tickets

Change History (8)

comment:1 Changed 8 years ago by nickm

Hm. I'm undecided here; I'll go with whatever consensus people have. These are advanced options of the "don't mess with them unless you know what you're doing" variety, so getting an unusable configuration out of them isn't too surprising.

(What did the user *think* would happen from saying "pick a random controlport" without having a way for the controller to find out what it was?)

comment:2 in reply to:  1 Changed 8 years ago by arma

Replying to nickm:

(What did the user *think* would happen from saying "pick a random controlport" without having a way for the controller to find out what it was?)

Turns out the user was in fact of the 'expert user' type. He configured his arm to use the control port he saw in his logs, and arm couldn't handle it because nobody told atagar about the possibility that controlport would be a non-integer:
https://trac.torproject.org/projects/tor/ticket/4471

The broader question here is about how to increase the odds that arm can be attached to a Tor run out of TBB. I don't think solving this ticket will address that broader question though.

comment:3 Changed 8 years ago by atagar

Nope, it won't. The problem is that making sense of a 'ControlPort auto' configuration requires that the controller knows where the torrc is located. However, this is a dynamic location for TBB.

When no interface argument is present arm attempts to bootstrap via the default control port and socket path. If they're using a random port with a torrc in a random location then I'm kinda at a loss for how to connect. I suppose I could snag the netstat output for everything with 'tor' in the name and try all of those ports but... ewwww.

My impression is that 'ControlPort auto' is a TBB-only hack that, like Vidalia's random controller password, excludes the use of other controllers. I'd be happy to be wrong, though. :)

comment:4 Changed 8 years ago by arma

Description: modified (diff)

comment:5 Changed 8 years ago by Sebastian

imo this is a wontfix, unless we want to generally overhaul all our options handling to check for known-problematic configuration. Also maybe you want to use a random port but don't want to write it to disk anywhere, and instead learn it with netstat? Who knows

comment:6 Changed 8 years ago by arma

Resolution: wontfix
Status: newclosed

I agree.

comment:7 Changed 7 years ago by nickm

Keywords: tor-client added

comment:8 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.