From 13a04c3a96a2d60c318be2e1712a363501db0e73 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 2 Oct 2009 14:27:42 +0000 Subject: [PATCH] Removed samba2 references git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14492 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/Changelog | 1 + gosa-core/contrib/gosa.conf.5 | 9 --- .../admin/groups/class_groupGeneric.inc | 59 ++++++++----------- .../admin/groups/class_groupManagement.inc | 11 ++-- gosa-core/plugins/admin/groups/generic.tpl | 3 - .../admin/users/class_userManagement.inc | 6 +- 6 files changed, 31 insertions(+), 58 deletions(-) diff --git a/gosa-core/Changelog b/gosa-core/Changelog index 0050aa5b6..84ebd51b6 100644 --- a/gosa-core/Changelog +++ b/gosa-core/Changelog @@ -16,6 +16,7 @@ GOsa2 changelog - Added "Domain" to department management - Various minor bugfixes - Moved to unified datepicker for dates + - Remove samba 2 * gosa 2.6.5 - Updated locales diff --git a/gosa-core/contrib/gosa.conf.5 b/gosa-core/contrib/gosa.conf.5 index 75ccf4858..da8283fb7 100644 --- a/gosa-core/contrib/gosa.conf.5 +++ b/gosa-core/contrib/gosa.conf.5 @@ -1025,15 +1025,6 @@ statement defines the base id to add to ordinary sid calculations - if not avail inside of the LDAP. .PP -.B sambaversion -.I 2/3 -.PP -The -.I sambaversion -statement defines the version of samba you want to write LDAP entries for. Be sure -to include the correct schema in this case. Valid values are 2 and 3. -.PP - .B sambaHashHook .I path .PP diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc index 979f90269..0cf314a07 100644 --- a/gosa-core/plugins/admin/groups/class_groupGeneric.inc +++ b/gosa-core/plugins/admin/groups/class_groupGeneric.inc @@ -35,7 +35,6 @@ class group extends plugin var $fon_group= FALSE; var $smbgroup= FALSE; var $groupType= FALSE; - var $samba3= FALSE; var $sambaSID= ""; var $sambaDomainName= "DEFAULT"; var $SID= ""; @@ -86,7 +85,6 @@ class group extends plugin plugin::plugin ($config, $dn); /* Load attributes depending on the samba version */ - $this->samba3= ($config->get_cfg_value("sambaversion") == 3); $this->orig_dn= $dn; $this->orig_cn= $this->cn; @@ -133,7 +131,7 @@ class group extends plugin } /* Get samba Domain in case of samba 3 */ - if ($this->samba3 && $this->sambaSID != ""){ + if ($this->sambaSID != ""){ $this->SID= preg_replace ("/-[^-]+$/", "", $this->sambaSID); $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); @@ -403,13 +401,6 @@ class group extends plugin return ($display); } - /* Assign templating stuff */ - if ($this->samba3){ - $smarty->assign("samba3", "true"); - } else { - $smarty->assign("samba3", ""); - } - if($this->config->search("nagiosaccount", "CLASS",array('menu'))){ $smarty->assign("nagios",true); }else{ @@ -478,26 +469,25 @@ class group extends plugin $smarty->assign("bases", $this->get_allowed_bases()); $smarty->assign("base_select", $this->base); - if ($this->samba3){ - $domains= array(); - foreach($this->config->data['SERVERS']['SAMBA'] as $name => $content){ - $domains[$name]= $name; - } - $smarty->assign("sambaDomains", $domains); - $smarty->assign("sambaDomainName", $this->sambaDomainName); - $groupTypes= array(0 => _("Samba group"), 512 => _("Domain admins"), 513 => _("Domain users"), - 514 => _("Domain guests")); - - /* Don't loose special groups! If not key'ed above, add it to - the combo box... */ - if ($this->groupType >= 500 && $this->groupType <= 553 && !isset($groupTypes[$this->groupType])){ - $groupTypes[$this->groupType]= sprintf(_("Special group (%d)"), $this->groupType); - } + $domains= array(); + foreach($this->config->data['SERVERS']['SAMBA'] as $name => $content){ + $domains[$name]= $name; + } + $smarty->assign("sambaDomains", $domains); + $smarty->assign("sambaDomainName", $this->sambaDomainName); + $groupTypes= array(0 => _("Samba group"), 512 => _("Domain admins"), 513 => _("Domain users"), + 514 => _("Domain guests")); - $smarty->assign("groupTypes", $groupTypes); - $smarty->assign("groupType", $this->groupType); + /* Don't loose special groups! If not key'ed above, add it to + the combo box... */ + if ($this->groupType >= 500 && $this->groupType <= 553 && !isset($groupTypes[$this->groupType])){ + $groupTypes[$this->groupType]= sprintf(_("Special group (%d)"), $this->groupType); } + $smarty->assign("groupTypes", $groupTypes); + $smarty->assign("groupType", $this->groupType); + + /* Members and users */ $smarty->assign("members", $this->members); @@ -861,7 +851,7 @@ class group extends plugin } /* Save sambaDomain attribute */ - if ($this->acl_is_writeable("sambaDomainName") && $this->samba3 && isset ($_POST['sambaDomainName'])){ + if ($this->acl_is_writeable("sambaDomainName") && isset ($_POST['sambaDomainName'])){ $this->sambaDomainName= $_POST['sambaDomainName']; $this->groupType= $_POST['groupType']; } @@ -970,7 +960,7 @@ class group extends plugin $ldap= $this->config->get_ldap_link(); /* Add samba group functionality */ - if ($this->samba3 && $this->smbgroup){ + if ($this->smbgroup){ /* Fixed undefined index ... */ @@ -1063,12 +1053,11 @@ class group extends plugin if (!count ($this->memberUid)){ $this->attrs['memberUid']= array(); } - if ($this->samba3){ - if (!$this->smbgroup){ - $this->attrs['sambaGroupType']= array(); - $this->attrs['sambaSID']= array(); - } + if (!$this->smbgroup){ + $this->attrs['sambaGroupType']= array(); + $this->attrs['sambaSID']= array(); } + $mode= "modify"; } else { $mode= "add"; @@ -1360,7 +1349,7 @@ class group extends plugin } /* Save sambaDomain attribute */ - if ($this->acl_is_writeable("sambaDomainName") && $this->samba3 && isset ($_POST['sambaDomainName'])){ + if ($this->acl_is_writeable("sambaDomainName") && isset ($_POST['sambaDomainName'])){ $this->sambaDomainName= $_POST['sambaDomainName']; $this->groupType= $_POST['groupType']; } diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc index acdbd2fa0..3fcee3c54 100644 --- a/gosa-core/plugins/admin/groups/class_groupManagement.inc +++ b/gosa-core/plugins/admin/groups/class_groupManagement.inc @@ -634,13 +634,12 @@ class groupManagement extends plugin } $sfilter= ""; - if ($this->config->get_cfg_value("sambaversion") == 3){ - if (!$ShowPrimaryGroups){ - $sfilter= "(objectClass=sambaGroupMapping)"; - } elseif ($ShowSambaGroups){ - $filter.= "(objectClass=sambaGroupMapping)"; - } + if (!$ShowPrimaryGroups){ + $sfilter= "(objectClass=sambaGroupMapping)"; + } elseif ($ShowSambaGroups){ + $filter.= "(objectClass=sambaGroupMapping)"; } + /* Prepare filter for given Regex && UserRegex */ if ($filter != ""){ diff --git a/gosa-core/plugins/admin/groups/generic.tpl b/gosa-core/plugins/admin/groups/generic.tpl index 5172c8b26..99c0ad7bd 100644 --- a/gosa-core/plugins/admin/groups/generic.tpl +++ b/gosa-core/plugins/admin/groups/generic.tpl @@ -74,8 +74,6 @@ {/if} -{if $samba3 ne ""} - {if $multiple_support} @@ -125,7 +123,6 @@ {/if} -{/if} {if $pickupGroup == "true"} diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index 1cfeeafaf..f3bb65658 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -1135,11 +1135,7 @@ class userManagement extends plugin /* Setup filter depending on selection */ $filter=""; - if ($this->config->get_cfg_value("sambaversion") == 3){ - $samba= "sambaSamAccount"; - } else { - $samba= "sambaAccount"; - } + $samba= "sambaSamAccount"; if ($ShowFunctionalUsers){ $filter.= "(&(objectClass=gosaAccount)(!(|(objectClass=posixAccount)". -- 2.30.2