Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1382053
Description of problem: Need to have validation for idrange name Version-Release number of selected component (if applicable): ipa-server-4.4.0-12.el7.x86_64 How reproducible: Always Steps to Reproduce: 1. Ensure two-way trust is added with IPA server 2. Now run the below command with empty domain name. #ipa idrange-add _id_range2 --dom-name= --rid-base=200000 --base-id=55 --range-size=5 3. Check the message on the console Actual results: [root@master]# ipa idrange-add _id_range2 --dom-name= --rid-base=200000 --base-id=55 --range-size=5 ipa: ERROR: an internal error has occurred error_log [Wed Oct 05 20:44:44.789504 2016] [:error] [pid 30073] File "/usr/lib/python2.7/site-packages/ipaserver/plugins/idrange.py", line 421, in pre_callback [Wed Oct 05 20:44:44.789506 2016] [:error] [pid 30073] options['ipanttrusteddomainname']) [Wed Oct 05 20:44:44.789509 2016] [:error] [pid 30073] File "/usr/lib/python2.7/site-packages/ipaserver/plugins/idrange.py", line 354, in get_trusted_domain_sid_from_name [Wed Oct 05 20:44:44.789519 2016] [:error] [pid 30073] sid = domain_validator.get_sid_from_domain_name(name) [Wed Oct 05 20:44:44.789522 2016] [:error] [pid 30073] File "/usr/lib/python2.7/site-packages/ipaserver/dcerpc.py", line 342, in get_sid_from_domain_name [Wed Oct 05 20:44:44.789525 2016] [:error] [pid 30073] if name in domains: [Wed Oct 05 20:44:44.789527 2016] [:error] [pid 30073] File "/usr/lib/python2.7/site-packages/ipapython/ipautil.py", line 671, in __contains__ [Wed Oct 05 20:44:44.789530 2016] [:error] [pid 30073] return super(CIDict, self).__contains__(key.lower()) [Wed Oct 05 20:44:44.789532 2016] [:error] [pid 30073] AttributeError: 'NoneType' object has no attribute 'lower' [Wed Oct 05 20:44:44.789938 2016] [:error] [pid 30073] ipa: INFO: [jsonserver_session] admin@TESTRELM.TEST: idrange_add/1(u'_id_range2', ipabaseid=55, ipaidrangesize=5, ipabaserid=200000, ipanttrusteddomainname=None, version=u'2.213'): AttributeError Expected results: Internal error should be fixed. Additional info:
Metadata Update from @pvoborni: - Issue assigned to someone - Issue set to the milestone: FreeIPA 4.5
Metadata Update from @mbasti: - Issue close_status updated to: None - Issue set to the milestone: FreeIPA 4.5.1 (was: FreeIPA 4.5)
Metadata Update from @frenaud: - Issue assigned to frenaud (was: someone)
Metadata Update from @frenaud: - Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/667
master:
ipa-4-5:
Keeping the ticket open until we also add tests for this.
regression test added in
342dcce tests: add non-reg for idrange-add ipa-4-5:
ab27067 tests: add non-reg for idrange-add
Metadata Update from @mbabinsk: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.