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

[tor-commits] [arm/master] Ignoring default deb Log config option



commit 13b9ffe93748f4af0cd886ba330a256e07de2b2f
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Wed Dec 7 07:36:19 2011 -0800

    Ignoring default deb Log config option
    
    Tor debs have their default logging configuration changed via a patch, as
    per...
    https://trac.torproject.org/projects/tor/ticket/4602
    
    Dropping this option when querying for the custom options the user has set to
    avoid giving a torrc validation error.
    
    This introduces a minor bug because if the user has this exact entry with a
    non-deb install, or the normal default log entry with a deb install, then arm
    will report that the entry matches the default. However, that would be a rare
    situation and this whole thing is a workaround for a tor bug so I'm fine with
    leaving it alone for now. Fixing that would need some method for checking if
    the instance we're connecting to was deb installed or not (I'm not sure how
    we'd do that).
    
    Issue was caught on a Tor Cloud image by koolfy
---
 src/util/torConfig.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/util/torConfig.py b/src/util/torConfig.py
index 477ad9e..e26f634 100644
--- a/src/util/torConfig.py
+++ b/src/util/torConfig.py
@@ -395,10 +395,17 @@ def getCustomOptions(includeValue = False):
   # from Tor's defaults with the exception of its Log and Nickname entries
   # which, even if undefined, returns "Log notice stdout" as per:
   # https://trac.torproject.org/projects/tor/ticket/2362
+  #
+  # If this is from the deb then it will be "Log notice file /var/log/tor/log"
+  # due to special patching applied to it, as per:
+  # https://trac.torproject.org/projects/tor/ticket/4602
   
   try: configLines.remove("Log notice stdout")
   except ValueError: pass
   
+  try: configLines.remove("Log notice file /var/log/tor/log")
+  except ValueError: pass
+  
   try: configLines.remove("Nickname %s" % socket.gethostname())
   except ValueError: pass
   

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