[tor-bugs] #5082 [Tor Client]: Tor cleans out environment before launching obfsproxy

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Mon Feb 13 03:29:48 UTC 2012


#5082: Tor cleans out environment before launching obfsproxy
------------------------+---------------------------------------------------
 Reporter:  Sebastian   |          Owner:                    
     Type:  task        |         Status:  needs_review      
 Priority:  major       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by arma):

 Replying to [comment:7 arma]:
 > I also tested it and it works.

 For posterity, here was my obfsproxy patch for testing it:
 {{{
 diff --git a/src/managed.c b/src/managed.c
 index 01814f8..ffa40a8 100644
 --- a/src/managed.c
 +++ b/src/managed.c
 @@ -26,6 +26,9 @@

  #include "container.h"

 +#include <unistd.h>
 +extern char **environ;
 +
  #include <event2/event.h>
  #include <event2/listener.h>

 @@ -430,6 +433,12 @@ handle_environment(managed_proxy_t *proxy)
    char *tmp;
    enum env_parsing_status status=ST_ENV_SMOOTH;

 +  char **environ_tmp = environ;
 +  while (*environ_tmp) {
 +    log_info("env: %s", *environ_tmp);
 +    environ_tmp++;
 +  }
 +
    tmp = getenv("TOR_PT_STATE_LOCATION");
    if (!tmp) {
      status = ST_ENV_FAIL_STATE_LOC;
 }}}

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


More information about the tor-bugs mailing list