diff --git a/src/local.c b/src/local.c index 52e1d966..7c6d4844 100644 --- a/src/local.c +++ b/src/local.c @@ -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); diff --git a/src/redir.c b/src/redir.c index 17b7a809..8d25b6c5 100644 --- a/src/redir.c +++ b/src/redir.c @@ -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!"); } diff --git a/src/server.c b/src/server.c index 3ee662d0..d69416bb 100644 --- a/src/server.c +++ b/src/server.c @@ -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(); diff --git a/src/tunnel.c b/src/tunnel.c index bac3e811..ba36b68f 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -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);