mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-25 18:23:42 +00:00
Refine #954
This commit is contained in:
@@ -1443,9 +1443,12 @@ main(int argc, char **argv)
|
||||
if (user != NULL && ! run_as(user)) {
|
||||
FATAL("failed to switch user");
|
||||
}
|
||||
|
||||
#ifndef __MINGW32__
|
||||
if (getuid() == 0){
|
||||
LOGI("You are running this process as the root user!");
|
||||
}
|
||||
#endif
|
||||
|
||||
// Init connections
|
||||
cork_dllist_init(&connections);
|
||||
|
||||
@@ -1024,6 +1024,7 @@ main(int argc, char **argv)
|
||||
if (user != NULL && ! run_as(user)) {
|
||||
FATAL("failed to switch user");
|
||||
}
|
||||
|
||||
if (getuid() == 0){
|
||||
LOGI("You are running this process as the root user!");
|
||||
}
|
||||
|
||||
@@ -1873,9 +1873,12 @@ main(int argc, char **argv)
|
||||
if (user != NULL && ! run_as(user)) {
|
||||
FATAL("failed to switch user");
|
||||
}
|
||||
|
||||
#ifndef __MINGW32__
|
||||
if (getuid() == 0){
|
||||
LOGI("You are running this process as the root user!");
|
||||
}
|
||||
#endif
|
||||
|
||||
// init block list
|
||||
init_block_list();
|
||||
|
||||
@@ -1031,9 +1031,12 @@ main(int argc, char **argv)
|
||||
if (user != NULL && ! run_as(user)) {
|
||||
FATAL("failed to switch user");
|
||||
}
|
||||
|
||||
#ifndef __MINGW32__
|
||||
if (getuid() == 0){
|
||||
LOGI("You are running this process as the root user!");
|
||||
}
|
||||
#endif
|
||||
|
||||
ev_run(loop, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user