[tor-bugs] #4881 [Tor Relay]: Relative paths for auth cookie

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Jan 10 16:24:18 UTC 2012


#4881: Relative paths for auth cookie
---------------------------+------------------------------------------------
 Reporter:  atagar         |          Owner:                    
     Type:  defect         |         Status:  needs_review      
 Priority:  major          |      Milestone:  Tor: 0.2.2.x-final
Component:  Tor Relay      |        Version:                    
 Keywords:  small-feature  |         Parent:                    
   Points:                 |   Actualpoints:                    
---------------------------+------------------------------------------------

Comment(by atagar):

 Yup, works - thanks for the fix!

 {{{
 atagar at morrigan:~$ cat .tor/torrc_relative
 SocksPort 0
 ControlPort 9051
 CookieAuthentication 1
 DataDirectory ./tor_data

 atagar at morrigan:~$ telnet localhost 9051
 Trying 127.0.0.1...
 Connected to localhost.
 Escape character is '^]'.
 PROTOCOLINFO
 250-PROTOCOLINFO 1
 250-AUTH METHODS=COOKIE COOKIEFILE="/home/atagar/.tor/control_auth_cookie"
 250-VERSION Tor="0.2.3.10-alpha-dev"
 250 OK

 514 Authentication required.
 Connection closed by foreign host.
 }}}

 When I cd to tor's location and start via "./tor -f ~/.tor/torrc_relative"
 it had an extra period in the response, but that doesn't hurt anything...

 {{{
 250-AUTH METHODS=COOKIE
 COOKIEFILE="/home/atagar/Desktop/tor/tor/src/or/./tor_data/control_auth_cookie"
 }}}

 I reported this issue on 1101 because it's both triggered by the same use
 case (a relative data directory path) and the fix I thought we would go
 with are the same (making tor internally track the data directory as an
 absolute path).

 We can certainly keep playing whack-a-mole with data directory path
 derived attributes, but wouldn't it be better to change this in
 'options_get_datadir_fname2_suffix' in config.c or wherever we set
 options->DataDirectory?

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


More information about the tor-bugs mailing list