[Freeipa-users] ipa: ERROR: invalid 'hostname': invalid domain-name: only letters, numbers, '-' are allowed. DNS label may not start or end with '-'

Łukasz Jaworski ender at kofeina.net
Tue Jun 14 05:52:19 UTC 2016


Hi,

freeipa-client-4.2.4-1.fc23.x86_64
freeipa-server-4.2.4-1.fc23.x86_64

I've tried add hostname with multiple hyphens. Sth like: example--name-of-host.example.com.
Output is: ipa: ERROR: invalid 'hostname': invalid domain-name: only letters, numbers, '-' are allowed. DNS label may not start or end with '-'

IMHO hyphens are not allowed: the first and last characters of
a label (RFC 952 and 1123)

If I'm right, in validate_dns_label (util.py) should be something like this:

diff util.py util.py.corrected
225c225
<     label_regex = r'^[%(base)s%(extra)s]([%(base)s%(extra)s%(middle)s]?[%(base)s%(extra)s])*$' \
---
>     label_regex = r'^[%(base)s%(extra)s]([%(base)s%(extra)s%(middle)s]+?[%(base)s%(extra)s])*$' \

Best regards,
Łukasz Jaworski "Ender"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-users/attachments/20160614/ff949126/attachment.htm>


More information about the Freeipa-users mailing list