[Freeipa-devel] [PATCH] 1012 validate domain in installer

Rob Crittenden rcritten at redhat.com
Mon May 14 21:29:38 UTC 2012


Martin Kosek wrote:
> On Fri, 2012-05-11 at 16:03 -0400, Rob Crittenden wrote:
>> Use our domain validator to validate the domain name we get in the
>> installer.
>>
>> rob
>
> I found few issues with the patch:
>
> 1) The "unexpected error" is not very user friendly error message:
>
> # ipa-server-install
> ...
> Server host name [vm-109.idm.lab.bos.redhat.com]:
>
> The domain name has been calculated based on the host name.
>
> Please confirm the domain name [idm.lab.bos.redhat.com]: bar-.com
>
> Unexpected error - see ipaserver-install.log for details:
>   only letters, numbers, and - are allowed. DNS label may not start or
> end with -
>
>
> I think we should make it consistent with hostname validation error
> message format:
>
> # ipa-server-install
> ...
> Server host name [vm-109.idm.lab.bos.redhat.com]: foo-
>
> Invalid hostname 'foo-', must be fully-qualified.
>
>
> 2) The error is also confusing when domain is passed as an option, user
> won't know what actually failed:
>
> # ipa-server-install --domain ..
> ...
> Server host name [vm-109.idm.lab.bos.redhat.com]:
>
> Unexpected error - see ipaserver-install.log for details:
>   empty DNS label
>
> As for value passed via option, I think we should quit immediately and
> not in second or third interactive step - like we do for --zonemgr
> validation:
>
> # ipa-server-install --zonemgr=foo
> Usage: ipa-server-install [options]
>
> ipa-server-install: error: invalid zonemgr: missing address domain
>
> This applies both for --hostname and --domain options.
>
> Martin
>

Done.

There is a separate ticket to validate hostname in the parser. It is a 
bit more complicated since it depends on other options so I punted on that.

rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-rcrit-1012-2-validator.patch
Type: text/x-diff
Size: 3219 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120514/2b5a6134/attachment.bin>


More information about the Freeipa-devel mailing list