diff --git a/src/local.c b/src/local.c index e8faceac..52e1d966 100644 --- a/src/local.c +++ b/src/local.c @@ -1443,7 +1443,7 @@ main(int argc, char **argv) if (user != NULL && ! run_as(user)) { FATAL("failed to switch user"); } - if (geteuid() == 0){ + if (getuid() == 0){ LOGI("You are running this process as the root user!"); } diff --git a/src/manager.c b/src/manager.c index 78bca1f4..b1994fce 100644 --- a/src/manager.c +++ b/src/manager.c @@ -848,11 +848,11 @@ main(int argc, char **argv) if (user != NULL && ! run_as(user)) { FATAL("failed to switch user"); } - if (geteuid() == 0){ + if (getuid() == 0){ LOGI("You are running this process as the root user!"); } - struct passwd *pw = getpwuid(geteuid()); + struct passwd *pw = getpwuid(getuid()); const char *homedir = pw->pw_dir; working_dir_size = strlen(homedir) + 15; working_dir = malloc(working_dir_size); diff --git a/src/redir.c b/src/redir.c index 5880c936..17b7a809 100644 --- a/src/redir.c +++ b/src/redir.c @@ -1024,7 +1024,7 @@ main(int argc, char **argv) if (user != NULL && ! run_as(user)) { FATAL("failed to switch user"); } - if (geteuid() == 0){ + if (getuid() == 0){ LOGI("You are running this process as the root user!"); } diff --git a/src/server.c b/src/server.c index f1467b65..3ee662d0 100644 --- a/src/server.c +++ b/src/server.c @@ -1873,7 +1873,7 @@ main(int argc, char **argv) if (user != NULL && ! run_as(user)) { FATAL("failed to switch user"); } - if (geteuid() == 0){ + if (getuid() == 0){ LOGI("You are running this process as the root user!"); } diff --git a/src/tunnel.c b/src/tunnel.c index 0bfe2ec0..bac3e811 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -1031,7 +1031,7 @@ main(int argc, char **argv) if (user != NULL && ! run_as(user)) { FATAL("failed to switch user"); } - if (geteuid() == 0){ + if (getuid() == 0){ LOGI("You are running this process as the root user!"); }