removed no longer used function and exec command
security++
This commit is contained in:
parent
76bfc3b547
commit
fab70cb590
16
lib/util.php
16
lib/util.php
|
@ -180,7 +180,6 @@ class OC_Util {
|
|||
}
|
||||
$CONFIG_DBTYPE = OC_Config::getValue( "dbtype", "sqlite" );
|
||||
$CONFIG_DBNAME = OC_Config::getValue( "dbname", "owncloud" );
|
||||
$serverUser=OC_Util::checkWebserverUser();
|
||||
|
||||
//common hint for all file permissons error messages
|
||||
$permissionsHint="Permissions can usually be fixed by giving the webserver write access to the ownCloud directory";
|
||||
|
@ -239,21 +238,6 @@ class OC_Util {
|
|||
OC_Template::printGuestPage("", "login", $parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to get the username the httpd server runs on, used in hints
|
||||
*/
|
||||
public static function checkWebserverUser(){
|
||||
if(is_callable('posix_getuid')){
|
||||
$serverUser=posix_getpwuid(posix_getuid());
|
||||
$serverUser='\''.$serverUser['name'].'\'';
|
||||
}elseif(exec('whoami')){
|
||||
$serverUser=exec('whoami');
|
||||
}else{
|
||||
$serverUser='\'www-data\' for ubuntu/debian'; //TODO: try to detect the distro and give a guess based on that
|
||||
}
|
||||
return $serverUser;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if the app is enabled, send json error msg if not
|
||||
|
|
Loading…
Reference in New Issue