Description of problem: when modifying the default search fields for users and groups , ipa config-mod --usersearch and --groupsearch should not allow fields to be added that don't exist. <snip> # ipa config-mod --usersearch="uid,givenname,sn,telephonenumber,ou,title,bogus" Max username length: 32 Home directory base: /home Default shell: /bin/sh Default users group: ipausers Default e-mail domain: testrelm Search time limit: 2 Search size limit: 100 User search fields: uid,givenname,sn,telephonenumber,ou,title,bogus Group search fields: cn,description Migration mode: FALSE Certificate Subject base: O=TESTRELM # ipa config-mod --groupsearch="cn,description,bogus" Max username length: 32 Home directory base: /home Default shell: /bin/sh Default users group: ipausers Default e-mail domain: testrelm Search time limit: 2 Search size limit: 100 User search fields: uid,givenname,sn,telephonenumber,ou,title,bogus Group search fields: cn,description,bogus Migration mode: FALSE Certificate Subject base: O=TESTRELM </snip Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. kinit as admin 2. see decription <snip> 3. Actual results: successful add a field that doesn't exist to the default search fields Expected results: error message stating that the field is invalid/doesn't exist Additional info:
https://fedorahosted.org/freeipa/ticket/845
master: 3dae8f18a67185c08dfa52d2e8f7cfcf9b5661b1
Verified: version: ipa-server-2.0.0-13.20110228T1743zgit99d6e08.el6.x86_64 ipa-admintools-2.0.0-13.20110228T1743zgit99d6e08.el6.x86_64 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: ipaconfig_searchfields_userfields_negative :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Add field bogus to user search fields :: [ PASS ] :: Attempt failed as expected :: [ LOG ] :: Duration: 3s :: [ LOG ] :: Assertions: 1 good, 0 bad :: [ PASS ] :: RESULT: ipaconfig_searchfields_userfields_negative :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: ipaconfig_searchfields_groupfields_negative :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Add field bogus to group search fields :: [ PASS ] :: Attempt failed as expected :: [ LOG ] :: Duration: 3s :: [ LOG ] :: Assertions: 1 good, 0 bad :: [ PASS ] :: RESULT: ipaconfig_searchfields_groupfields_negative