[Freeipa-devel] [PATCH] 255 Improve error message in zonemgr validator
Martin Kosek
mkosek at redhat.com
Mon Apr 30 15:29:20 UTC 2012
On Mon, 2012-04-30 at 16:29 +0200, Martin Kosek wrote:
> On Mon, 2012-04-30 at 14:02 +0200, Martin Kosek wrote:
> > This patch consolidates zonemgr function to move the most of the
> > checks to common functions in order to provide consistent output.
> > The error messages produced by the validator should now be more
> > helpful when identifying the source of error.
> >
> > https://fedorahosted.org/freeipa/ticket/1966
>
> Rob found a corner case with "foo..bar" where the error message was not
> as helpful as it could be. Now, the empty parts are handled better:
>
> # ipa dnszone-mod example.com --admin-email=.foo
> ipa: ERROR: invalid 'admin_email': missing mail account
> # ipa dnszone-mod example.com --admin-email=foo.
> ipa: ERROR: invalid 'admin_email': missing address domain
> # ipa dnszone-mod example.com --admin-email=foo..bar
> ipa: ERROR: invalid 'admin_email': empty DNS label
>
> Martin
Rob found one more issue with the error message (this one is actually
quite old). DNS label starting with a hyphen is also not allowed, but we
state that we forbid just a label ending with it. The attached patch
fixes the error message.
# ipa dnszone-mod example.com --admin-email=foo.-baz
ipa: ERROR: invalid 'admin_email': only letters, numbers, and - are
allowed. DNS label may not start or end with -
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mkosek-255-3-improve-error-message-in-zonemgr-validator.patch
Type: text/x-patch
Size: 4272 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120430/0aae89f8/attachment.bin>
More information about the Freeipa-devel
mailing list