]> source.dussan.org Git - nextcloud-server.git/commitdiff
removed no longer used function and exec command
authorFrank Karlitschek <karlitschek@kde.org>
Thu, 24 Nov 2011 12:50:29 +0000 (13:50 +0100)
committerFrank Karlitschek <karlitschek@kde.org>
Thu, 24 Nov 2011 12:50:29 +0000 (13:50 +0100)
security++

lib/util.php

index 14313569a1d81544ed8a9b443e5db6271592a050..0f79948bc242689735e533f21231a39985fac807 100644 (file)
@@ -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