freeipa

FreeIPA is an integrated Identity and Authentication solution for Linux/UNIX networked environments.  |  http://www.freeipa.org/

#1418 Use full attribute name in error message with --setaddr/addattr

Created 7 years ago by rcritten
Modified 2 years ago

https://bugzilla.redhat.com/show_bug.cgi?id=718015

The error message for setting max failures to a negative number references the user friendly option "maxfail" even when using setattr and knowing the real attribute name. However, the error message for setting max failures to an invalid character references the attribute name even when using the user friendly option "maxfail".

# ipa pwpolicy-mod --setattr=krbpwdmaxfailure=-1
ipa: ERROR: invalid 'maxfail': must be at least 0

# ipa pwpolicy-mod --maxfail=-1
ipa: ERROR: invalid 'maxfail': must be at least 0

############################################################################

# ipa pwpolicy-mod --maxfail=-abc
ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer

# ipa pwpolicy-mod --setattr=krbpwdmaxfailure=adf
ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer

It would prolly be better to reference what the command was executed with as to not be confusing.

Please retest.

retested on ipa-server-2.1.1-4.el6.x86_64, and this issue still exists

Moving the ticket to the next month iteration.

This is fixed in current master.

Failed verification

If you specify --maxfail (flag option) error message references the attribute
krbpwdmaxfailure

A number of things to test other than just the Int type.

These should return the attribute name:

ipa pwpolicy-mod --setattr=krbpwdmaxfailure=adf
ipa pwpolicy-mod --setattr=krbpwdmaxfailure=-1
ipa pwpolicy-mod --setattr krbpwdmaxfailure=99999999999999999999999999999999999999999999999999999
ipa service-mod --setattr usercertificate=XYX imap/foo.example.com
ipa config-mod --setattr ipahomesrootdir='/home/pín'

These should return the cli_name:

ipa pwpolicy-mod --maxfail=abc
ipa pwpolicy-mod --maxfail=-1
ipa pwpolicy-mod --maxfail=99999999999999999999999999999999999999999999999999999
ipa service-mod --cert=XYX imap/foo.example.com
ipa config-mod --homedirectory='/home/pín'

Simple program to show we get the right error back from other clients too, see ticket 187
attrerr.py

master: f18cfd7[[BR]]
ipa-2-2: a533224

2 years ago

Metadata Update from @rcritten:
- Issue assigned to rcritten
- Issue set to the milestone: FreeIPA 2.2 Core Effort - 2012/03

Login to comment on this ticket.

defect

IPA

1

https://bugzilla.redhat.com/show_bug.cgi?id=718015

cancel