[or-cvs] warn if you"re running tor as root

Roger Dingledine arma at seul.org
Sun Dec 14 04:39:25 UTC 2003


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	main.c 
Log Message:
warn if you're running tor as root


Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- main.c	14 Dec 2003 04:33:18 -0000	1.156
+++ main.c	14 Dec 2003 04:39:23 -0000	1.157
@@ -623,6 +623,11 @@
   add_stream_log(LOG_INFO, "<stdout>", stdout);
   log_fn(LOG_WARN,"Tor v%s. This is experimental software. Do not use it if you need anonymity.",VERSION);
 
+#ifndef MS_WINDOWS
+  if(geteuid()==0)
+    log_fn(LOG_WARN,"You are running Tor as root. You don't need to, and you probably shouldn't.");
+#endif
+
   if (init_from_config(argc,argv) < 0)
     return -1;
 



More information about the tor-commits mailing list