Code

Fixed moving of groups to another domain
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Mar 2007 07:51:55 +0000 (07:51 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Mar 2007 07:51:55 +0000 (07:51 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5898 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupGeneric.inc

index 26bf2169f5019979227694c817412cb10e7a9575..efcd5d1f38ae9f9e7b8c13906c6e17c82b91f644 100644 (file)
@@ -24,6 +24,7 @@ class group extends plugin
   var $allusers= array();
   var $department= "";
   var $saved_gidNumber= "";
+  var $savedSID= "";
   var $oldgroupType= "";
   var $orig_dn= "";
   var $orig_cn= "";
@@ -96,6 +97,7 @@ class group extends plugin
     /* Get samba Domain in case of samba 3 */
     if ($this->samba3 && $this->sambaSID != ""){
       $this->SID= preg_replace ("/-[^-]+$/", "", $this->sambaSID);
+      $this->savedSID= $this->SID;
       $ldap= $this->config->get_ldap_link();
       $ldap->cd($this->config->current['BASE']);
       $ldap->search ("(&(objectClass=sambaDomain)(sambaSID=$this->SID))",array("sambaAlgorithmicRidBase"));
@@ -622,7 +624,7 @@ class group extends plugin
       /* Check if we need to create a special entry */
       if ($this->groupType == 0){
 
-        if ($this->sambaSID == "" || $this->oldgroupType != $this->groupType){
+        if ($this->sambaSID == "" || $this->SID != $this->savedSID || $this->oldgroupType != $this->groupType ){
           $gidNumber= $this->gidNumber;
           while(TRUE){
             $sid= $this->SID."-".($gidNumber*2 + $this->ridBase+1);