[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Warn if running obsolete windows as a server.
Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv16367/src/or
Modified Files:
config.c
Log Message:
Warn if running obsolete windows as a server.
Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.498
retrieving revision 1.499
diff -u -p -d -r1.498 -r1.499
--- config.c 9 Feb 2006 05:46:48 -0000 1.498
+++ config.c 11 Feb 2006 21:26:40 -0000 1.499
@@ -1840,6 +1840,7 @@ options_validate(or_options_t *old_optio
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_optio
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.");