[tor-commits] [tor/master] Warn loudly on startup and SIGHUP if Tor is built for a non-anonymous mode

nickm at torproject.org nickm at torproject.org
Wed Nov 30 19:56:17 UTC 2011


commit 5f3e6eb0b9b450c81bd54d5dd87ff786a6d1ffea
Author: Robert Ransom <rransom.8774 at gmail.com>
Date:   Wed Nov 23 16:46:38 2011 -0800

    Warn loudly on startup and SIGHUP if Tor is built for a non-anonymous mode
---
 src/or/config.c |    5 +++++
 src/or/main.c   |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/or/config.c b/src/or/config.c
index bddae6f..734efdf 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1294,6 +1294,11 @@ options_act(const or_options_t *old_options)
   if (consider_adding_dir_authorities(options, old_options) < 0)
     return -1;
 
+#ifdef NON_ANONYMOUS_MODE_ENABLED
+  log(LOG_WARN, LD_GENERAL, "This copy of Tor was compiled to run in a "
+      "non-anonymous mode. It will provide NO ANONYMITY.");
+#endif
+
 #ifdef ENABLE_TOR2WEB_MODE
   if (!options->Tor2webMode) {
     log_err(LD_CONFIG, "This copy of Tor was compiled to run in "
diff --git a/src/or/main.c b/src/or/main.c
index 7008d38..266356a 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -2256,6 +2256,11 @@ tor_init(int argc, char *argv[])
                  "Expect more bugs than usual.");
   }
 
+#ifdef NON_ANONYMOUS_MODE_ENABLED
+  log(LOG_WARN, LD_GENERAL, "This copy of Tor was compiled to run in a "
+      "non-anonymous mode. It will provide NO ANONYMITY.");
+#endif
+
   if (network_init()<0) {
     log_err(LD_BUG,"Error initializing network; exiting.");
     return -1;





More information about the tor-commits mailing list