From a0dd385daeb0e63315bde01b4c25e6997815faa6 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 27 Mar 2007 07:51:55 +0000 Subject: [PATCH] Fixed moving of groups to another domain git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5898 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/groups/class_groupGeneric.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc index 26bf2169f..efcd5d1f3 100644 --- a/plugins/admin/groups/class_groupGeneric.inc +++ b/plugins/admin/groups/class_groupGeneric.inc @@ -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); -- 2.30.2