Univention Bugzilla – Bug 36012
Warn about hostnames with underscores
Last modified: 2017-09-20 15:03:38 CEST
We (UMC) allow hostnames to have underscores (bug31798) presumably to be able to takeover AD domains that may contain hostnames converted from NetBIOS names that may contain underscores. A customer reported via http://forum.univention.de/viewtopic.php?f=48&t=3492 that registering those host names in DNS may fail. We could add a diagnostic module to check for "not RFC compliant" host names.
Created attachment 8909 [details] 36012-diagnostic-hostname-check-420.patch Check hostnames (filter objectClass=univentionHost, attribute cn) for RFC 1123 [1] compliance. If any non-compliant hostnames are found, a Warning is raised. [1]: https://tools.ietf.org/html/rfc1123#section-2
Created attachment 8910 [details] 36012-diagnostic-hostname-check-420.patch Update, forgot to squash.
Committed in r81609 - r81610 (advisory r81649).
Looks good :) What I tested: Checked two computers with: "cn=foo-" and "cn=foo_under" -> The diagnose module warned me about them -> OK YAML -> OK Note: If I understand the RFC correctly dots in hostnames and hostnames up to 255 characters would be ok, too. But that way we might not be able to add them to the dns. Because of that I would say the regex is good.
(In reply to Jürn Brodersen from comment #4) > If I understand the RFC correctly dots in hostnames and hostnames up to 255 > characters would be ok, too. But that way we might not be able to add them > to the dns. Because of that I would say the regex is good. The regex is the one from `hostName` from univention.admin.syntax without the underscores.
<http://errata.software-univention.de/ucs/4.2/166.html>