Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=87f27750b2357272f36e079fffec058580f9dce9
commit 87f27750b2357272f36e079fffec058580f9dce9 Author: James Buren <[email protected]> Date: Mon Aug 27 17:37:47 2012 -0500 check if we're running as root and setup locale diff --git a/Main.cc b/Main.cc index 1192863..15e5a0c 100644 --- a/Main.cc +++ b/Main.cc @@ -1,11 +1,19 @@ #include <stdlib.h> +#include <unistd.h> +#include <locale.h> #include "UserInterface.hh" #include "Utility.hh" int main(int argc,char **argv) { + if(geteuid() != 0) + return EXIT_FAILURE; + + if(setlocale(LC_ALL,"") == 0) + return EXIT_FAILURE; + if(!ui.initialize(argc,argv)) - return false; + return EXIT_FAILURE; return EXIT_SUCCESS; } _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
