tbrehm
2010-06-16 e28564dbde4f922a6a8263e3dea32d56b60b5b5b
server/lib/classes/system.inc.php
@@ -464,6 +464,28 @@
        return false;
   }
   
   /*
   // Alternative implementation of the is_group function. Should be faster then the old one To be tested.
   function is_group($group) {
   $groupfile = '/etc/group';
   if(is_file($groupfile)) {
      $handle = fopen ($groupfile, "r");
      while (!feof($handle)) {
         $line = trim(fgets($handle, 4096));
         if($line != ""){
            $parts = explode(":", $line);
              if($parts[0] == $group) {
               fclose ($handle);
               return true;
            }
         }
      }
      fclose ($handle);
   }
   return false;
   }
   */
   function root_group(){
      global $app;
        $group_datei = $this->server_conf["group_datei"];
@@ -1180,7 +1202,9 @@
      
      if($user != '' && $this->is_user($user) && $user != 'root') {
         $user = escapeshellarg($user);
         exec("chown $user $dir $dir_cur $dir_new $dir_tmp");
         // I assume that the name of the (vmail group) is the same as the name of the mail user in ispconfig 3
         $group = $user;
         exec("chown $user:$group $dir $dir_cur $dir_new $dir_tmp");
      }
      
      //* Add the subfolder to the subscriptions and courierimapsubscribed files