mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-29 12:36:53 +00:00
Fix #954
This commit is contained in:
+1
-1
@@ -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!");
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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);
|
||||
|
||||
+1
-1
@@ -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!");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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!");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user