[or-cvs] In my private little universe, terminals are still 80 colum...

Nick Mathewson nickm at seul.org
Fri Dec 9 05:37:28 UTC 2005


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv25721/src/or

Modified Files:
	buffers.c config.c control.c directory.c dirserv.c hibernate.c 
	main.c routerlist.c 
Log Message:
In my private little universe, terminals are still 80 columns.  Impose a 160-character-per-line limit; this will creep down.

Index: buffers.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/buffers.c,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -d -r1.180 -r1.181
--- buffers.c	30 Nov 2005 22:48:58 -0000	1.180
+++ buffers.c	9 Dec 2005 05:37:26 -0000	1.181
@@ -967,7 +967,12 @@
           buf_remove_from_front(buf, 10);
           if (!address_is_in_virtual_range(req->address) &&
               !have_warned_about_unsafe_socks) {
-            warn(LD_APP,"Your application (using socks5 on port %d) is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead.  For more information, please see http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#SOCKSAndDNS", req->port);
+            warn(LD_APP,"Your application (using socks5 on port %d) is giving "
+                 "Tor only an IP address. Applications that do DNS resolves "
+                 "themselves may leak information. Consider using Socks4A "
+                 "(e.g. via privoxy or socat) instead.  For more information, "
+                 "please see http://wiki.noreply.org/noreply/TheOnionRouter/"
+                 "TorFAQ#SOCKSAndDNS", req->port);
 //            have_warned_about_unsafe_socks = 1; // (for now, warn every time)
           }
           return 1;
@@ -986,7 +991,9 @@
           req->port = ntohs(get_uint16(buf->cur+5+len));
           buf_remove_from_front(buf, 5+len+2);
           if (log_sockstype)
-            notice(LD_APP, "Your application (using socks5 on port %d) gave Tor a hostname, which means Tor will do the DNS resolve for you. This is good.", req->port);
+            notice(LD_APP, "Your application (using socks5 on port %d) gave "
+                   "Tor a hostname, which means Tor will do the DNS resolve "
+                   "for you. This is good.", req->port);
           return 1;
         default: /* unsupported */
           warn(LD_APP,"socks5: unsupported address type %d. Rejecting.",*(buf->cur+3));
@@ -1041,7 +1048,10 @@
       if (socks4_prot != socks4a &&
           !address_is_in_virtual_range(tmpbuf) &&
           !have_warned_about_unsafe_socks) {
-        warn(LD_APP,"Your application (using socks4 on port %d) is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead.", req->port);
+        warn(LD_APP,"Your application (using socks4 on port %d) is giving Tor "
+             "only an IP address. Applications that do DNS resolves "
+             "themselves may leak information. Consider using Socks4A (e.g. "
+             "via privoxy or socat) instead.", req->port);
 //      have_warned_about_unsafe_socks = 1; // (for now, warn every time)
       }
       if (socks4_prot == socks4a) {
@@ -1061,7 +1071,9 @@
         }
         tor_assert(next < buf->cur+buf->datalen);
         if (log_sockstype)
-          notice(LD_APP, "Your application (using socks4a on port %d) gave Tor a hostname, which means Tor will do the DNS resolve for you. This is good.", req->port);
+          notice(LD_APP, "Your application (using socks4a on port %d) gave "
+                 "Tor a hostname, which means Tor will do the DNS resolve "
+                 "for you. This is good.", req->port);
       }
       debug(LD_APP,"socks4: Everything is here. Success.");
       strlcpy(req->address, startaddr ? startaddr : tmpbuf,
@@ -1089,7 +1101,9 @@
 "</p>\n"
 "<p>\n"
 "See <a href=\"http://tor.eff.org/documentation.html\">http://tor.eff.org/documentation.html</a> for more information.\n"
-"<!-- Plus this comment, to make the body response more than 512 bytes, so IE will be willing to display it. Comment comment comment comment comment comment comment comment comment comment comment comment.-->\n"
+"<!-- Plus this comment, to make the body response more than 512 bytes, so "
+"     IE will be willing to display it. Comment comment comment comment "
+"     comment comment comment comment comment comment comment comment.-->\n"
 "</p>\n"
 "</body>\n"
 "</html>\n"

Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.457
retrieving revision 1.458
diff -u -d -r1.457 -r1.458
--- config.c	9 Dec 2005 05:22:15 -0000	1.457
+++ config.c	9 Dec 2005 05:37:26 -0000	1.458
@@ -1799,7 +1799,9 @@
   }
 
   if (server_mode(options) && !options->ContactInfo)
-    log(LOG_NOTICE, LD_CONFIG, "Your ContactInfo config option is not set. Please consider setting it, so we can contact you if your server is misconfigured or something else goes wrong.");
+    log(LOG_NOTICE, LD_CONFIG, "Your ContactInfo config option is not set. "
+        "Please consider setting it, so we can contact you if your server is "
+        "misconfigured or something else goes wrong.");
 
   if (normalize_log_options(options))
     return -1;
@@ -2016,7 +2018,9 @@
   }
   if (server_mode(options) &&
       options->BandwidthRate < ROUTER_REQUIRED_MIN_BANDWIDTH*2) {
-    log(LOG_WARN,LD_CONFIG,"BandwidthRate is set to %d bytes/second. For servers, it must be at least %d.", (int)options->BandwidthRate, ROUTER_REQUIRED_MIN_BANDWIDTH*2);
+    log(LOG_WARN,LD_CONFIG,"BandwidthRate is set to %d bytes/second. "
+        "For servers, it must be at least %d.",
+        (int)options->BandwidthRate, ROUTER_REQUIRED_MIN_BANDWIDTH*2);
     result = -1;
   }
   if (options->BandwidthRate > options->BandwidthBurst)
@@ -2114,7 +2118,12 @@
   if (options->DirServers) {
     if (!old_options ||
         !config_lines_eq(options->DirServers, old_options->DirServers))
-        COMPLAIN("You have used DirServer to specify directory authorities in your configuration.  This is potentially dangerous: it can make you look different from all other Tor users, and hurt your anonymity.  Even if you've specified the same authorities as Tor uses by default, the defaults could change in the future.  Be sure you know what you're doing.");
+        COMPLAIN("You have used DirServer to specify directory authorities in "
+                 "your configuration.  This is potentially dangerous: it can "
+                 "make you look different from all other Tor users, and hurt "
+                 "your anonymity.  Even if you've specified the same "
+                 "authorities as Tor uses by default, the defaults could "
+                 "change in the future.  Be sure you know what you're doing.");
     for (cl = options->DirServers; cl; cl = cl->next) {
       if (parse_dir_server_line(cl->value, 1)<0)
         result = -1;
@@ -2682,7 +2691,9 @@
     return -1;
   }
 
-  log(LOG_WARN, LD_CONFIG, "The old LogLevel/LogFile/DebugLogFile/SysLog options are deprecated, and will go away soon.  Your new torrc line should be: 'Log %s'", buf);
+  log(LOG_WARN, LD_CONFIG, "The old LogLevel/LogFile/DebugLogFile/SysLog "
+      "options are deprecated, and will go away soon.  Your new torrc line "
+      "should be: 'Log %s'", buf);
   config_line_append(&options->Logs, "Log", buf);
   tor_free(buf);
   return 0;
@@ -2735,7 +2746,8 @@
   }
 
   if (options->DebugLogFile) {
-    if (add_single_log_option(options, LOG_DEBUG, LOG_ERR, "file", options->DebugLogFile) < 0)
+    if (add_single_log_option(options, LOG_DEBUG, LOG_ERR, "file",
+                              options->DebugLogFile) < 0)
       return -1;
   }
 
@@ -2746,7 +2758,10 @@
   return 0;
 }
 
-#define DEFAULT_EXIT_POLICY "reject private:*,reject *:25,reject *:119,reject *:135-139,reject *:445,reject *:465,reject *:587,reject *:1214,reject *:4661-4666,reject *:6346-6429,reject *:6699,reject *:6881-6999,accept *:*"
+#define DEFAULT_EXIT_POLICY                                                  \
+  "reject private:*,reject *:25,reject *:119,reject *:135-139,reject *:445," \
+  "reject *:465,reject *:587,reject *:1214,reject *:4661-4666,"              \
+  "reject *:6346-6429,reject *:6699,reject *:6881-6999,accept *:*"
 
 /** Add the default exit policy entries to <b>policy</b>
  */
@@ -3081,7 +3096,9 @@
    if (!options->DataDirectory && !strcmp(fn,"/.tor")) {
      /* If our homedir is /, we probably don't want to use it. */
      /* XXXX Default to /var/lib/tor? */
-     warn(LD_CONFIG, "Default DataDirectory is \"~/.tor\".  This expands to \"%s\", which is probably not what you want.  Using \"%s/tor\" instead", fn, LOCALSTATEDIR);
+     warn(LD_CONFIG, "Default DataDirectory is \"~/.tor\".  This expands to "
+          "\"%s\", which is probably not what you want.  Using \"%s/tor\" "
+          "instead", fn, LOCALSTATEDIR);
      tor_free(fn);
      fn = tor_strdup(LOCALSTATEDIR"/tor");
 

Index: control.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/control.c,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -d -r1.154 -r1.155
--- control.c	3 Dec 2005 02:12:37 -0000	1.154
+++ control.c	9 Dec 2005 05:37:26 -0000	1.155
@@ -985,7 +985,10 @@
         ++i;
       password = tor_malloc(i/2 + 1);
       if (base16_decode(password, i/2+1, body, i)<0) {
-        connection_write_str_to_buf("551 Invalid hexadecimal encoding.  Maybe you tried a plain text password?  If so, the standard requires you put it in double quotes.\r\n", conn);
+        connection_write_str_to_buf(
+            "551 Invalid hexadecimal encoding.  Maybe you tried a plain text "
+            "password?  If so, the standard requires you put it in double "
+            "quotes.\r\n", conn);
         tor_free(password);
         return 0;
       }
@@ -1031,7 +1034,9 @@
     if (used_quoted_string)
       connection_write_str_to_buf("515 Authentication failed\r\n", conn);
     else
-      connection_write_str_to_buf("515 Authentication failed.  Maybe you tried a plain text password?  If so, the standard requires you put it in double quotes.\r\n", conn);
+      connection_write_str_to_buf(
+         "515 Authentication failed.  Maybe you tried a plain text password?  "
+         "If so, the standard requires you put it in double quotes.\r\n",conn);
   }
   return 0;
  ok:

Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.321
retrieving revision 1.322
diff -u -d -r1.321 -r1.322
--- directory.c	19 Nov 2005 10:33:34 -0000	1.321
+++ directory.c	9 Dec 2005 05:37:26 -0000	1.322
@@ -1060,7 +1060,11 @@
         warn(LD_GENERAL,"http status 400 (\"%s\") response from dirserver '%s:%d'. Please correct.", reason, conn->address, conn->port);
         break;
       case 403:
-        warn(LD_GENERAL,"http status 403 (\"%s\") response from dirserver '%s:%d'. Is your clock skewed? Have you mailed us your key fingerprint? Are you using the right key? Are you using a private IP address? See http://tor.eff.org/doc/tor-doc-server.html", reason, conn->address, conn->port);
+        warn(LD_GENERAL,"http status 403 (\"%s\") response from dirserver "
+             "'%s:%d'. Is your clock skewed? Have you mailed us your key "
+             "fingerprint? Are you using the right key? Are you using a "
+             "private IP address? See http://tor.eff.org/doc/"
+             "tor-doc-server.html", reason, conn->address, conn->port);
         break;
       default:
         warn(LD_GENERAL,"http status %d (\"%s\") reason unexpected (server '%s:%d').", status_code, reason, conn->address, conn->port);
@@ -1365,14 +1369,19 @@
           return -1;
         }
         tor_free(inp);
-        tor_snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\nContent-Type: application/octet-stream\r\nContent-Encoding: deflate\r\n\r\n",
+        tor_snprintf(tmp, sizeof(tmp),
+           "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\n"
+           "Content-Type: application/octet-stream\r\n"
+           "Content-Encoding: deflate\r\n\r\n",
                      date,
                      (int)compressed_len);
         connection_write_to_buf(tmp, strlen(tmp), conn);
         connection_write_to_buf(compressed, compressed_len, conn);
         tor_free(compressed);
       } else {
-        tor_snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\nContent-Type: text/plain\r\n\r\n",
+        tor_snprintf(tmp, sizeof(tmp),
+           "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\n"
+           "Content-Type: text/plain\r\n\r\n",
                      date,
                      (int)len);
         connection_write_to_buf(tmp, strlen(tmp), conn);

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.274
retrieving revision 1.275
diff -u -d -r1.274 -r1.275
--- dirserv.c	9 Dec 2005 02:46:46 -0000	1.274
+++ dirserv.c	9 Dec 2005 05:37:26 -0000	1.275
@@ -427,7 +427,9 @@
   /* Is there too much clock skew? */
   now = time(NULL);
   if (ri->cache_info.published_on > now+ROUTER_ALLOW_SKEW) {
-    notice(LD_DIRSERV, "Publication time for nickname '%s' is too far (%d minutes) in the future; possible clock skew. Not adding (ContactInfo '%s', platform '%s').",
+    notice(LD_DIRSERV, "Publication time for nickname '%s' is too far "
+           "(%d minutes) in the future; possible clock skew. Not adding "
+           "(ContactInfo '%s', platform '%s').",
            ri->nickname, (int)((ri->cache_info.published_on-now)/60),
            ri->contact_info ? ri->contact_info : "",
            ri->platform ? ri->platform : "");

Index: hibernate.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/hibernate.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- hibernate.c	14 Nov 2005 19:17:28 -0000	1.63
+++ hibernate.c	9 Dec 2005 05:37:26 -0000	1.64
@@ -614,7 +614,11 @@
   interval_start_time = t1;
   expected_bandwidth_usage = expected_bw;
 
-  info(LD_ACCT, "Successfully read bandwidth accounting file written at %s for interval starting at %s.  We have been active for %lu seconds in this interval.  At the start of the interval, we expected to use about %lu KB per second. ("U64_FORMAT" bytes read so far, "U64_FORMAT" bytes written so far)",
+  info(LD_ACCT, "Successfully read bandwidth accounting file written at %s "
+       "for interval starting at %s.  We have been active for %lu seconds in "
+       "this interval.  At the start of the interval, we expected to use "
+       "about %lu KB per second. ("U64_FORMAT" bytes read so far, "
+       U64_FORMAT" bytes written so far)",
          (char*)smartlist_get(elts,2),
          (char*)smartlist_get(elts,1),
          (unsigned long)n_seconds_active_in_interval,

Index: main.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.598
retrieving revision 1.599
diff -u -d -r1.598 -r1.599
--- main.c	8 Dec 2005 21:12:47 -0000	1.598
+++ main.c	9 Dec 2005 05:37:26 -0000	1.599
@@ -475,7 +475,9 @@
         severity = LOG_INFO;
       else
         severity = LOG_NOTICE;
-      log_fn(severity, LD_NET, "Something wrong with your network connection? Conn (addr %s, fd %d, type %s, state %d) tried to write %d bytes but timed out. (Marked at %s:%d)",
+      log_fn(severity, LD_NET, "Something wrong with your network connection? "
+             "Conn (addr %s, fd %d, type %s, state %d) tried to write %d "
+             "bytes but timed out. (Marked at %s:%d)",
              safe_str(conn->address), conn->s, conn_type_to_string(conn->type),
              conn->state,
              (int)buf_datalen(conn->outbuf), conn->marked_for_close_file,
@@ -921,10 +923,14 @@
     /* every 20 minutes, check and complain if necessary */
     routerinfo_t *me = router_get_my_routerinfo();
     if (me && !check_whether_orport_reachable())
-      warn(LD_CONFIG,"Your server (%s:%d) has not managed to confirm that its ORPort is reachable. Please check your firewalls, ports, address, /etc/hosts file, etc.",
+      warn(LD_CONFIG,"Your server (%s:%d) has not managed to confirm that "
+           "its ORPort is reachable. Please check your firewalls, ports, "
+           "address, /etc/hosts file, etc.",
           me->address, me->or_port);
     if (me && !check_whether_dirport_reachable())
-      warn(LD_CONFIG,"Your server (%s:%d) has not managed to confirm that its DirPort is reachable. Please check your firewalls, ports, address, /etc/hosts file, etc.",
+      warn(LD_CONFIG,"Your server (%s:%d) has not managed to confirm that its "
+           "DirPort is reachable. Please check your firewalls, ports, "
+           "address, /etc/hosts file, etc.",
           me->address, me->dir_port);
   }
 

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.385
retrieving revision 1.386
diff -u -d -r1.385 -r1.386
--- routerlist.c	6 Dec 2005 06:55:43 -0000	1.385
+++ routerlist.c	9 Dec 2005 05:37:26 -0000	1.386
@@ -1519,7 +1519,9 @@
               router->nickname, router->contact_info ? router->contact_info : "",
               router->platform ? router->platform : "");
           } else {
-            info(LD_DIR,"'%s' may be unreachable -- the %d previous descriptors were thought to be unreachable.", router->nickname, router->num_unreachable_notifications);
+            info(LD_DIR,"'%s' may be unreachable -- the %d previous "
+                 "descriptors were thought to be unreachable.",
+                 router->nickname, router->num_unreachable_notifications);
             router->num_unreachable_notifications++;
           }
         }
@@ -1913,7 +1915,9 @@
   format_iso_time(published, ns->published_on);
 
   if (ns->published_on > now + NETWORKSTATUS_ALLOW_SKEW) {
-    warn(LD_GENERAL, "Network status from %s was published in the future (%s GMT). Somebody is skewed here: check your clock. Not caching.", trusted_dir->description, published);
+    warn(LD_GENERAL, "Network status from %s was published in the future "
+         "(%s GMT). Somebody is skewed here: check your clock. Not caching.",
+         trusted_dir->description, published);
     skewed = 1;
   }
 



More information about the tor-commits mailing list