[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser-bundle-testsuite/master] Bug 40016: Start Tor with DisableNetwork=1



commit b0171e40c3a40f45d62a41265a27c66778a346b0
Author: Alex Catarineu <acat@xxxxxxxxxxxxxx>
Date:   Wed Jan 20 13:19:54 2021 +0100

    Bug 40016: Start Tor with DisableNetwork=1
    
    This should be closer to how it's done by tor-launcher and should
    help us catch issues like tor-browser#40282.
---
 TBBTestSuite/Tests/TorBootstrap.pm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/TBBTestSuite/Tests/TorBootstrap.pm b/TBBTestSuite/Tests/TorBootstrap.pm
index 006be59..252ce67 100644
--- a/TBBTestSuite/Tests/TorBootstrap.pm
+++ b/TBBTestSuite/Tests/TorBootstrap.pm
@@ -62,6 +62,10 @@ sub monitor_bootstrap {
     print $sock 'AUTHENTICATE "', $control_passwd, "\"\n";
     my $r = <$sock>;
     exit_error "Authentication error: $r" unless $r =~ m/^250 OK/;
+
+    print $sock "SETCONF DisableNetwork=0\n";
+    $r = <$sock>;
+    exit_error "SETCONF DisableNetwork=0 error: $r" unless $r =~ m/^250 OK/;
     my $i = 0;
     while (1) {
         print $sock "GETINFO status/bootstrap-phase\n";
@@ -162,7 +166,8 @@ sub start_tor {
         'GeoIPFile', winpath($tbbinfos->{torgeoip}),
         'ClientOnionAuthDir', winpath("$tbbinfos->{datadir}/Tor/onion-auth"),
         '__SocksPort', "$options->{'tor-socks-port'} ExtendedErrors IPv6Traffic PreferIPv6 KeepAliveIsolateSOCKSAuth",
-        '__OwningControllerProcess', winpid($$));
+        '__OwningControllerProcess', winpid($$),
+        'DisableNetwork', '1');
     $tbbinfos->{torpid} = fork;
     if ($tbbinfos->{torpid} == 0) {
         $ENV{LD_LIBRARY_PATH} = "$tbbinfos->{tbbdir}:$tbbinfos->{tordir}";



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits