aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-01-19 06:12:32 +0000
committerRoger Dingledine <arma@torproject.org>2004-01-19 06:12:32 +0000
commitfb81a32c68bebdfe1be0ff1c903938addd774c98 (patch)
tree3447d26ba8e98e5dc2363e2942d76c961e866e56 /src
parent522982f8e9616d735f08e7ea6492d13b62ade12d (diff)
downloadtor-fb81a32c68bebdfe1be0ff1c903938addd774c98.tar
tor-fb81a32c68bebdfe1be0ff1c903938addd774c98.tar.gz
setuid to User _before_ complaining about running as root
svn:r1006
Diffstat (limited to 'src')
-rw-r--r--src/or/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 374849c29..a03d85081 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -628,14 +628,14 @@ int tor_main(int argc, char *argv[]) {
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();
}