diff --git a/src/local.c b/src/local.c index 7c6d4844..e31a6a22 100644 --- a/src/local.c +++ b/src/local.c @@ -1445,7 +1445,7 @@ main(int argc, char **argv) } #ifndef __MINGW32__ - if (getuid() == 0){ + if (geteuid() == 0){ LOGI("You are running this process as the root user!"); } #endif diff --git a/src/manager.c b/src/manager.c index aa5fb334..0407648a 100644 --- a/src/manager.c +++ b/src/manager.c @@ -850,7 +850,7 @@ main(int argc, char **argv) } #ifndef __MINGW32__ - if (getuid() == 0){ + if (geteuid() == 0){ LOGI("You are running this process as the root user!"); } #endif diff --git a/src/redir.c b/src/redir.c index 8d25b6c5..f1776ad5 100644 --- a/src/redir.c +++ b/src/redir.c @@ -1025,7 +1025,7 @@ main(int argc, char **argv) FATAL("failed to switch user"); } - if (getuid() == 0){ + if (geteuid() == 0){ LOGI("You are running this process as the root user!"); } diff --git a/src/server.c b/src/server.c index d69416bb..b173692e 100644 --- a/src/server.c +++ b/src/server.c @@ -1875,7 +1875,7 @@ main(int argc, char **argv) } #ifndef __MINGW32__ - if (getuid() == 0){ + if (geteuid() == 0){ LOGI("You are running this process as the root user!"); } #endif diff --git a/src/tunnel.c b/src/tunnel.c index ba36b68f..8cfb0441 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -1033,7 +1033,7 @@ main(int argc, char **argv) } #ifndef __MINGW32__ - if (getuid() == 0){ + if (geteuid() == 0){ LOGI("You are running this process as the root user!"); } #endif