Ver código fonte

Warn if running obsolete windows as a server.

svn:r5961
Nick Mathewson 19 anos atrás
pai
commit
91847124bf
1 arquivos alterados com 10 adições e 0 exclusões
  1. 10 0
      src/or/config.c

+ 10 - 0
src/or/config.c

@@ -1840,6 +1840,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
   int result = 0;
   config_line_t *cl;
   addr_policy_t *addr_policy=NULL;
+  const char *uname;
 #define REJECT(arg) \
   do { log(LOG_WARN, LD_CONFIG, arg); result = -1; } while (0)
 #define COMPLAIN(arg) do { log(LOG_WARN, LD_CONFIG, arg); } while (0)
@@ -1847,6 +1848,15 @@ options_validate(or_options_t *old_options, or_options_t *options,
   if (options->ORPort < 0 || options->ORPort > 65535)
     REJECT("ORPort option out of bounds.");
 
+  uname = get_uname();
+  if (server_mode(options) &&
+      (!strcmpstart(uname, "Windows 95") ||
+       !strcmpstart(uname, "Windows 98") ||
+       !strcmpstart(uname, "Windows Me"))) {
+    log(LOG_WARN, LD_CONFIG, "Tor is running as a server, but you are "
+        "running %s; this probably won't work.", get_uname());
+  }
+
   if (options->ORPort == 0 && options->ORListenAddress != NULL)
     REJECT("ORPort must be defined if ORListenAddress is defined.");