From: Frank Karlitschek Date: Thu, 24 Nov 2011 12:50:29 +0000 (+0100) Subject: removed no longer used function and exec command X-Git-Tag: v3.0~85^2~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fab70cb59062ae945825c820787c05c7f8630bf3;p=nextcloud-server.git removed no longer used function and exec command security++ --- diff --git a/lib/util.php b/lib/util.php index 14313569a1d..0f79948bc24 100644 --- a/lib/util.php +++ b/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