From 79a98a66d8a13859b2219b01d8cf8e164d01b8ff Mon Sep 17 00:00:00 2001 From: Max Lv Date: Wed, 16 Nov 2016 18:19:51 +0800 Subject: [PATCH] Refine geteuid() --- src/local.c | 2 +- src/manager.c | 2 +- src/redir.c | 2 +- src/server.c | 2 +- src/tunnel.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) 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