From: hickert Date: Fri, 11 Jul 2008 08:57:55 +0000 (+0000) Subject: Fixed samba && network class X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bc2668c8cf19da863c1443084a9f4ebc4563fbaf;p=gosa.git Fixed samba && network class - MACisMust wasn't used in checks - Samba uid can't be changed. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@11603 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_termDNS.inc b/plugins/admin/systems/class_termDNS.inc index 10677515e..a9568b3c0 100644 --- a/plugins/admin/systems/class_termDNS.inc +++ b/plugins/admin/systems/class_termDNS.inc @@ -448,16 +448,18 @@ class termDNS extends plugin $message[]= _("Wrong IP format in field IP-address."); } - /* Check if mac is empty - */ - if ($this->macAddress == "" && chkacl ($this->acl, "macAddress") == ""){ - $message[]= _("The required field 'MAC-address' is not set."); - } + if($this->MACisMust || $this->dhcp_is_Account){ + /* Check if mac is empty + */ + if ($this->macAddress == "" && chkacl ($this->acl, "macAddress") == ""){ + $message[]= _("The required field 'MAC-address' is not set."); + } - /* Check if given mac is valid mac - */ - if(!is_mac($this->macAddress)){ - $message[]=(_("The given macaddress is invalid. There must be 6 2byte segments seperated by ':'.")); + /* Check if given mac is valid mac + */ + if(!is_mac($this->macAddress)){ + $message[]=(_("The given macaddress is invalid. There must be 6 2byte segments seperated by ':'.")); + } } /* only perfrom this checks if this is a valid DNS account */ diff --git a/plugins/admin/systems/class_winGeneric.inc b/plugins/admin/systems/class_winGeneric.inc index a8bba757d..986712523 100644 --- a/plugins/admin/systems/class_winGeneric.inc +++ b/plugins/admin/systems/class_winGeneric.inc @@ -30,6 +30,7 @@ class wingeneric extends plugin var $sambaPwdLastSet=""; var $sambaAcctFlags=""; var $netConfigDNS; + /* attribute list for save action */ var $ignore_account= TRUE; var $attributes = array("cn", "description","shadowLastChange", @@ -45,6 +46,7 @@ class wingeneric extends plugin plugin::plugin ($config, $dn, $parent); $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses); $this->netConfigDNS->acl = $this->acl; + $this->netConfigDNS->MACisMust = FALSE; /* Set base */ if ($this->dn == "new"){ @@ -166,7 +168,7 @@ class wingeneric extends plugin /* Call common method to give check the hook */ $message= plugin::check(); $message= array_merge($message, $this->netConfigDNS->check()); - $this->dn= "cn=".$this->cn.",ou=netdevices,ou=systems,".$this->base; + $this->dn= "cn=".$this->uid.",".get_winstations_ou().$this->base; $ui= get_userinfo(); $acl= get_permissions ($this->dn, $ui->subtreeACL); diff --git a/plugins/admin/systems/tabs_winstation.inc b/plugins/admin/systems/tabs_winstation.inc index b04f89f98..2922b88c0 100644 --- a/plugins/admin/systems/tabs_winstation.inc +++ b/plugins/admin/systems/tabs_winstation.inc @@ -25,7 +25,7 @@ class wintabs extends tabs $baseobject->cn .= "$"; } - $this->dn= "uid=$baseobject->cn,".get_winstations_ou().$baseobject->base; + $this->dn= "uid=$baseobject->uid,".get_winstations_ou().$baseobject->base; $baseobject->dn= $this->dn; foreach ($this->by_object as $key => $obj){