]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Warn loudly on startup and SIGHUP if Tor is built for a non-anonymous mode
authorRobert Ransom <rransom.8774@gmail.com>
Thu, 24 Nov 2011 00:46:38 +0000 (16:46 -0800)
committerNick Mathewson <nickm@torproject.org>
Wed, 30 Nov 2011 19:54:14 +0000 (14:54 -0500)
src/or/config.c
src/or/main.c

index bddae6fc226107e5a421bf427498704c84617041..734efdf74e2e187b2237f2d9175ecc1be7731e9e 100644 (file)
@@ -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 "
index 7008d388a1170e8df6bcaca50df811cb5fb39e06..266356a9664bc3607941838cf00866d1bf505f2a 100644 (file)
@@ -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;