summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c72d3af)
raw | patch | inline | side by side (parent: c72d3af)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 25 Oct 2007 14:29:51 +0000 (14:29 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 25 Oct 2007 14:29:51 +0000 (14:29 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7665 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_componentGeneric.inc b/plugins/admin/systems/class_componentGeneric.inc
index 2e65dccb06dd49077e326a59ea1ad929d0ae1ffd..09ca79507a9c22c524a0961d8fc16f3f59908b52 100644 (file)
$message[]= _("The required field 'Component 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.");
+ }
+
/* To check for valid ip*/
if($this->netConfigDNS->ipHostNumber == ""){
$message[]= _("The required field IP address is empty.");
diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc
index 33388787b8305f5c3b945b43bb3fbd10777cf728..0374211aec1af26666802a851a6ad6db25182412 100644 (file)
$message[]= _("The 'Phone name' '0' is reserved and cannot be used.");
}
+ /* 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.");
+ }
+
$ui= get_userinfo();
$acl= get_permissions ($this->dn, $ui->subtreeACL);
$acl= get_module_permission($acl, "phone", $this->dn);
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 86d13fa9fb1ffe440221ab98bfefe12fab688a51..1345146e6cc60db8a5abbae64c5272fab669831e 100644 (file)
}
/* must: cn */
- if(($this->BelongsTo == "Printer") && !preg_match("/^[a-z0-9\.\-_]*$/i",$this->cn)){
+ if(($this->BelongsTo == "Printer") && !is_dns_name($this->cn)){
$message[]= _("Invalid character in printer name.");
}
diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc
index d730adafecfc220ee460ed65de51ab61afac623f..ca9ed1740a3798b87696fbabfbccb3d90d14b6a0 100644 (file)
$message[]= _("The required field 'Server 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.");
+ }
+
$ui= get_userinfo();
$acl= get_permissions ($this->dn, $ui->subtreeACL);
$acl= get_module_permission($acl, "servgeneric", $this->dn);
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index dcfce668c29693af556020d05854451cbff0c0ba..aa593d854fde9d879826e411e02c15fec262416c 100644 (file)
$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']);
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 341dc15a86b0b2cfe285a0ca0cb18c0b4516020c..ca1333fbdd7e8625559f7a7a58c2bd2f178f0238 100644 (file)
$message[]= _("The required field 'Workstation 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 != $this->dn){
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->base);