From fab70cb59062ae945825c820787c05c7f8630bf3 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Thu, 24 Nov 2011 13:50:29 +0100 Subject: [PATCH] removed no longer used function and exec command security++ --- lib/util.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/util.php b/lib/util.php index 14313569a1..0f79948bc2 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