Code

Added check to all system entries which checks for a valid host name.
[gosa.git] / plugins / admin / systems / class_terminalGeneric.inc
index dcfce668c29693af556020d05854451cbff0c0ba..aa593d854fde9d879826e411e02c15fec262416c 100644 (file)
@@ -422,6 +422,11 @@ class termgeneric extends plugin
       $message[]= _("The required field 'Terminal name' is not set.");
     }
 
+    /* Check if given name is a valid host/dns name */
+    if(!is_dns_name($this->cn) && chkacl ($this->acl, "cn") == ""){
+      $message[] = _("Please specify a valid name for this object.");
+    }
+
     if ($this->orig_dn == 'new'){
       $ldap= $this->config->get_ldap_link();
       $ldap->cd ($this->config->current['BASE']);