CC-3573: Use posix_geteuid instead of "whoami" to detect who is running PHP script

-done
This commit is contained in:
Martin Konecny 2012-04-02 19:25:27 -04:00
parent 61c5c839dd
commit c66f0c783f
12 changed files with 12 additions and 12 deletions

View file

@ -11,7 +11,7 @@ require_once(__DIR__.'/airtime-constants.php');
require_once(dirname(__FILE__).'/AirtimeIni.php');
require_once(dirname(__FILE__).'/AirtimeInstall.php');
if(exec("whoami") != "root"){
if(posix_geteuid() != 0){
echo "Must be root user.\n";
exit(1);
}