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

[tor-commits] [stem/master] Integ tests failed to create a control socket



commit 83b99dbe6579af04f18553740b175d6de44fa27d
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Mar 25 08:12:30 2013 -0700

    Integ tests failed to create a control socket
    
    The RUN_SOCKET test was failing while trying to make the control socket because
    it tried to change the permissions of /tmp to 700 (which, of course, normal
    users can't).
    
    Tor rejects to start if the control socket is in a globally readable directory,
    so making a temporary directory we can set the permissions on.
---
 test/runner.py |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/test/runner.py b/test/runner.py
index 7fa9c41..fb4a4cd 100644
--- a/test/runner.py
+++ b/test/runner.py
@@ -89,7 +89,7 @@ INTEG_RUNNER = None
 # control authentication options and attributes
 CONTROL_PASSWORD = "pw"
 CONTROL_PORT = 1111
-CONTROL_SOCKET_PATH = tempfile.mkstemp()[1]
+CONTROL_SOCKET_PATH = os.path.join(tempfile.mkdtemp(), 'socket')
 
 Torrc = stem.util.enum.Enum(
   ("PORT", "ControlPort %i" % CONTROL_PORT),
@@ -627,10 +627,9 @@ class Runner(object):
       test.output.print_line("failed (%s)" % exc, *ERROR_ATTR)
       raise exc
 
-    # Makes a directory for the control socket if needed. As of, at least, Tor
-    # 0.2.3.10 it checks during startup that the directory a control socket
-    # resides in is only accessible by the tor user (and refuses to finish
-    # starting if it isn't).
+    # Tor checks during startup that the directory a control socket resides in
+    # is only accessible by the tor user (and refuses to finish starting if it
+    # isn't).
 
     if Torrc.SOCKET in self._custom_opts:
       try:



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