[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] setuid to User _before_ complaining about running as root



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:
setuid to User _before_ complaining about running as root


Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -d -r1.164 -r1.165
--- main.c	16 Jan 2004 08:27:17 -0000	1.164
+++ main.c	19 Jan 2004 06:12:32 -0000	1.165
@@ -628,14 +628,14 @@
   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);
 
+  if (init_from_config(argc,argv) < 0)
+    return -1;
+
 #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;
-
   if (options.RunAsDaemon) {
     start_daemon();
   }