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

Rob Crittenden rcritten at redhat.com
Tue Jun 14 11:56:38 UTC 2016


Łukasz Jaworski wrote:
> 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])*$'
>     \

See https://fedorahosted.org/freeipa/ticket/4710

rob




More information about the Freeipa-users mailing list