[tor-bugs] #4896 [Stem]: Chroot set up for stem

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Feb 14 17:07:42 UTC 2012


#4896: Chroot set up for stem
-------------------------+--------------------------------------------------
 Reporter:  gsathya      |          Owner:  atagar      
     Type:  enhancement  |         Status:  needs_review
 Priority:  normal       |      Milestone:              
Component:  Stem         |        Version:              
 Keywords:               |         Parent:              
   Points:               |   Actualpoints:              
-------------------------+--------------------------------------------------

Comment(by atagar):

 > This looks good. Has it been merged?

 Nope, I was waiting for you to look it over first. Also, there's still
 more work to do here. The chroot integ target doesn't pass since the
 library doesn't yet account for chroot setups. A few options that come to
 mind are...

 - Simply have a chroot global which users set and the library consults to
 expand paths. This is the naive solution that I used for arm and for most
 users this is all that we need. It's trivial to implement but won't
 account for users who have multiple tor instances, each with their own
 chroot.

 - Make the chroot path an attribute of the ControlSocket. I have mixed
 feelings about this since it would address the above issue, but it isn't
 really a socket property and is meaningless if we're connecting to a
 remote host. If we did add this there then I'd propose three functions...

 is_localhost() - true if the attached instance is on our system, false if
 it's remote
 get_chroot_prefix()
 set_chroot_prefix()

 Thoughts?

 > Also, would it be possible to write a chroot decorator?

 I'm not familiar with python's decorators - I'll read up on them in a bit.
 Chroot is an attribute of the test run, rather than a particular test so
 I'm not sure of their benefit here. We want to confirm that all of the
 integ tests pass when we have a chroot setup, not just specific ones.

 Cheers! -Damian

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


More information about the tor-bugs mailing list