fix: Fix path for the locales, return error when running as root
This commit is contained in:
@ -160,6 +160,11 @@ END:
|
||||
}
|
||||
|
||||
int main(int argc, char** argv, char** envp){
|
||||
if(getuid()==0){
|
||||
error(_("You should use this script as a regular user, not as root!"));
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
signal(SIGINT, SIG_IGN);
|
||||
setlocale(LC_ALL, "");
|
||||
textdomain("mp");
|
||||
@ -185,7 +190,7 @@ int main(int argc, char** argv, char** envp){
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
free(mpi_path);
|
||||
|
||||
|
||||
char* doas_path = check_path("doas");
|
||||
if(NULL==doas_path) {
|
||||
doas_path = check_path("sudo");
|
||||
|
Reference in New Issue
Block a user