This commit is contained in:
Max Lv
2016-11-16 14:04:57 +08:00
parent a76f8f46ba
commit 6d9331a56d
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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!");
}