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]
Check hostnames (filter objectClass=univentionHost, attribute cn) for RFC 1123  compliance. If any non-compliant hostnames are found, a Warning is raised.
Created attachment 8910 [details]
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
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.