summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Netgroup nisdomain and hosts validationOndrej Hamada2012-03-2810-31/+165
| | | | | | | | | | | | | | | | | | | | | | | | nisdomain validation: Added pattern to the 'nisdomain' parameter to validate the specified nisdomain name. According to most common use cases the same pattern as for netgroup should fit. Unit-tests added. https://fedorahosted.org/freeipa/ticket/2448 'add_external_pre_callback' function was created to allow validation of all external members. Validation is based on usage of objects primary key parameter. The 'add_external_pre_callback' fucntion has to be called directly from in the 'pre_callback' function. This change affects netgroup, hbacrule and sudorule commands. For hostname, the validator allows non-fqdn and underscore characters. validate_hostname function in ipalib.util was modified and contains additional option that allows hostname to contain underscore characters. This option is disabled by default. Unit-tests added. https://fedorahosted.org/freeipa/ticket/2447
* Tolerate UDP port failures in conncheckMartin Kosek2012-03-271-5/+16
| | | | | | | | | | | | | | | UDP port checks in ipa-replica-conncheck are too strict. The entire conncheck fails when UDP ports cannot be verified as open. However, UDP protocol is unrealiable by its nature and the port can also not be checked if there is an application already bound to it. This can happen for example when ipa-replica-conncheck is run as a part of ipa-ca-install and the replica services are thus already running. This patch changes the behavior of UDP port checks. The conncheck script now rather reports a warning that UDP port cannot be verified but does not fail the entire test. https://fedorahosted.org/freeipa/ticket/2514
* Add CLI parsing testsPetr Viktorin2012-03-284-5/+207
| | | | | | | These test that command lines are parsed to correct Command arguments. Includes some tests for interactive prompts. To make this possible cli.run is broken up into several pieces.
* Change parameters to use only default_from for dynamic default values.Jan Cholasta2012-03-287-115/+30
| | | | | | | | | Replace all occurences of create_default with equivalent default_from and remove create_default from the framework. This is needed for proper parameter validation, as there is no way to tell which parameters to validate prior to calling create_default, because create_default does not provide information about which parameters are used for generating the default value.
* Fix the procedure for getting default values of command parameters.Jan Cholasta2012-03-283-34/+75
| | | | | | | The parameters used in default_from of other parameters are now properly validated before the default_from is called. ticket 1847
* Add requires on python-krbV to client subpackageRob Crittenden2012-03-281-0/+4
| | | | | | This is needed since ipa-client-install initializes the ipalib api. https://fedorahosted.org/freeipa/ticket/2577
* Replace broken i18n shell test with Python testJohn Dennis2012-03-264-68/+576
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had been using shell scripts and sed to test our translations. But trying to edit pot and po files with sed is nearly impossible because the file format can vary significantly and the sed editing was failing and gettext tools were complaining about our test strategy. We had been using a Python script (test_i18n.py) to perform the actual test after using shell, sed, and gettext tools to create the files. There is a Python library (polib) which can read/write/edit pot/po/mo files (used internally by Transifex, our translation portal). The strategy now is to do everything in Python (in test_i18n.py). This is easier, more robust and allows us to do more things. * add python-polib to BuildRequires * Remove the logic for creating the test lang from Makefile.in and replace it with calls to test_i18n.py * add argument parsing, usage, configuration parameters, etc. to test_i18n.py to make it easier to use and configurable. * add function to generate a test po and mo file. It also writes the files and creates the test directory structure. * Took the existing validate code and refactored it into validation function. It used to just pick one string and test it, now it iterates over all strings and all plural forms. * Validate anonymous Python format substitutions in pot file * added support for plural forms. * Add pot po file validation for variable substitution * In install/po subdir you can now do: $ make test $ make validate-pot $ make validate-po * The options for running test_i18n.py are: $ ./test_i18n.py --help Usage: test_i18n.py --test-gettext test_i18n.py --create-test test_i18n.py --validate-pot [pot_file1, ...] test_i18n.py --validate-po po_file1 [po_file2, ...] Options: -h, --help show this help message and exit -s, --show-strings show the offending string when an error is detected --pedantic be aggressive when validating -v, --verbose be informative --traceback print the traceback when an exception occurs Operational Mode: You must select one these modes to run in -g, --test-gettext create the test translation file(s) and exercise them -c, --create-test create the test translation file(s) -P, --validate-pot validate pot file(s) -p, --validate-po validate po file(s) Run Time Parameters: These may be used to modify the run time defaults --test-lang=TEST_LANG test po file uses this as it's basename (default=test) --lang=LANG lang used for locale, MUST be a valid lang (default=xh_ZA) --domain=DOMAIN translation domain used during test (default=ipa) --locale=LOCALE locale used during test (default=test_locale) --pot-file=POT_FILE default pot file, used when validating pot file or generating test po and mo files (default=ipa.pot) https://fedorahosted.org/freeipa/ticket/2044
* Fix uses of O=REALM instead of the configured certificate subject base.Jan Cholasta2012-03-266-13/+32
| | | | ticket 2521
* Fix dnsrecord-del interactive modeMartin Kosek2012-03-271-2/+1
| | | | | | | User was not able to select multiple values in dnsrecord-del interactive mode. https://fedorahosted.org/freeipa/ticket/2581
* Parse zone indices in IPv6 addresses in CheckedIPAddress.Jan Cholasta2012-03-272-1/+18
| | | | | | If a zone index is present in an IPv6 address, it is ignored. ticket 2138
* Improve user awareness about dnsconfigMartin Kosek2012-03-265-0/+52
| | | | | | | | | | | | Global DNS configuration is a nice tool to maintain a common DNS settings stored in LDAP which are then used for all enrolled IPA servers. However, the settings stored in LDAP override local settings in named.conf on DNS servers. This patch adds more information about global DNS configuration options in install scripts and DNS module help. https://fedorahosted.org/freeipa/ticket/2525
* Amend permissions for new DNS attributesMartin Kosek2012-03-253-1/+50
| | | | | | | | | | | | New features in bind-dyndb-ldap and IPA DNS plugin pulled new attributes and objectclasses. ACIs and permissions need to be updated to allow users with appropriate permissions update these attributes in LDAP. This patch updates the ACI for DNS record updates and adds one new permission to update global DNS configuration. https://fedorahosted.org/freeipa/ticket/2510
* Use valid argument names in testsPetr Viktorin2012-03-258-15/+12
| | | | | | | | | | | Some of our tests used unintended extra options, or options with misspelled, wrongly copy-pasted or otherwise bad names. These are ignored, so the intended argument was treated as missing. The test itself can still pass but may be rendered ineffective or fragile. This only fixes those of such errors that appear in the test suite. Fixing code in the framework and actual rejecting of unknown arguments is deferred for later (ticket #2509).
* Set nsslapd-minssf-exclude-rootdse to on so the DSE is always available.Rob Crittenden2012-03-262-1/+5
| | | | | | | | If minssf is set in configuration and this is not set then clients won't be able to detect the available namingContexts, defaultNamingContext, capabilities, etc. https://fedorahosted.org/freeipa/ticket/2542
* Set minimum version of 389-ds-base to 1.2.10.4-2 to fix upgrade issueRob Crittenden2012-03-261-1/+4
| | | | | | | The IPA upgrade process was starting before 389-ds had upgraded the database which caused corruption. https://fedorahosted.org/freeipa/ticket/2541
* Add missing BuildRequiresPetr Viktorin2012-03-261-0/+5
| | | | | | | | Since our build process runs pylint, we need all Python dependencies installed at RPM creation time. This adds python-lxml and python-pyasn1 to BuildRequires. https://fedorahosted.org/freeipa/ticket/2538
* Fix unit tests to work with new comma-support, validation requirementsRob Crittenden2012-03-263-7/+7
|
* Typos in FreeIPA messagesOndrej Hamada2012-03-233-4/+4
| | | | | | | Rebased patch sent by Yuri Chornoivan (yurchor@ukr.net). Fixes 'occured' and 'commond' typos in FreeIPA messages. https://fedorahosted.org/freeipa/ticket/2526
* Fix default SOA serial formatMartin Kosek2012-03-231-2/+2
| | | | | | RFC 1912 recommends format YYYYMMDDnn, we used YYYYDDMMnn. https://fedorahosted.org/freeipa/ticket/2567
* Avoid deleting DNS zone when a context is reusedMartin Kosek2012-03-231-5/+12
| | | | | | | | | | | | | | | | | | | When dnsrecord-del pre_callback detects that the record does not contain any records, it sets a flag to connection context and deletes the record object later. However, when more dnsrecord-del commands share the same context (and this is the case of "ipa-replica-manage del $MASTER" DNS cleanup), it may reuse a positive flag from previous dnsrecord-del command and delete the root DNS zone record and thus effectively delete the zone. This patch makes sure that this flag is always initialized to a sane value in dnsrecord-del pre_callback to make sure that the DNS zone is not deleted. It also fixes pre_callback function definition to prevent adding attrs_list to "keys" parameter and thus confuse developers. https://fedorahosted.org/freeipa/ticket/2503
* Wait for child process to terminate after receiving SIGINT in ipautil.run.Jan Cholasta2012-03-232-16/+16
| | | | | | | Do cleanup on KeyboardInterrupt rather than in custom SIGINT handler in ipa-replica-conncheck. https://fedorahosted.org/freeipa/ticket/2127
* When changing multiple booleans with setsebool, pass each of them separately.Alexander Bokovoy2012-03-231-1/+3
| | | | Fixes SELinux configuration for ipa-server-install with selinux-policy 3.10.0-104.fc17.
* Fix LDAP effective rights control with python-ldap 2.4.xMartin Kosek2012-03-221-2/+14
| | | | | | | | | | | | The new version of python-ldap changed the way it created LDAPv3 extended controls. The API used in 2.4.x can no longer be used because it does not send the bind DN with effective rights control and LDAP server thus rejects it. This patch implements the new API in a backward compatible way so that it works both with python-ldap versions 2.3.x and 2.4.x. https://fedorahosted.org/freeipa/ticket/2565
* Normalize the primary key value to lowercase during migration.Rob Crittenden2012-03-221-0/+1
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=804609
* Fix attributes that contain DNs when migrating.Rob Crittenden2012-03-222-2/+52
| | | | | | | Some attributes, like secretary and manager, may point to other LDAP entries. We need to fix these during migration. https://fedorahosted.org/freeipa/ticket/2562
* Harden raw record processing in DNS pluginMartin Kosek2012-03-222-12/+64
| | | | | | | | | | | | | | | | There were cases where DNS plugin was too tolerant in a raw DNS record option (--<rrtype-rec) processing. It let people specify DNS record parts options in dnsrecord-mod operations for some record without specifying the record that should be updated. It also ignored DNS record parts in dnsrecord-add operation when the raw DNS record value was already set via --<rrtype>-rec option. This patch hardens the processing and returns error in both described cases to make the processes clearer and more robust. All these use cases were also covered by new unit tests. https://fedorahosted.org/freeipa/ticket/2551
* Fix memleak and silence Coverity defectsSimo Sorce2012-03-224-2/+11
| | | | | | | | | | | | | | | Some of these are not real defects, because we are guaranteed to have valid context in some functions, and checks are not necessary. I added the checks anyway in order to silence Coverity on these issues. One meleak on error condition was fixed in daemons/ipa-kdb/ipa_kdb_pwdpolicy.c Silence errors in ipa-client/ipa-getkeytab.c, the code looks wrong, but it is actually fine as we count before hand so we never actually use the wrong value that is computed on the last pass when p == 0 Fixes: https://fedorahosted.org/freeipa/ticket/2488
* Fix precallback validators in DNS pluginMartin Kosek2012-03-222-28/+59
| | | | | | | | | | | | | | | DNS plugin contains several RR type record validators run in pre_callback which cannot be used as standard param validator as it needs more data and resources that standard validators provide. However, the precallback validators are not run for DNS records created by new structured options and thus an invalid value may slip in. This patch moves the execution of these precallback validators _after_ the processing of structured DNS options. It also cleans them up a little and makes them more robust. https://fedorahosted.org/freeipa/ticket/2550
* Search allowed attributes in superior objectclassesOndrej Hamada2012-03-222-0/+38
| | | | | | | | | | get_allowed_attributes function was improved to look for allowed attributes also in the superior objectclasses of specified objectclass. This fixes the regression caused by patch for ticket #2293. Test-case for unit-test was also created. https://fedorahosted.org/freeipa/ticket/2293
* Fix test failure testing rename with an invalid hostname.Rob Crittenden2012-03-211-1/+1
| | | | Validation is going to catch the invalid hostname before the mod is tried.
* Only split CSV in the client, quote instead of escapingPetr Viktorin2012-03-209-39/+88
| | | | | | | | | | | | | | | | | Splitting on commas is not an idempotent operation: 'a,b\,c' -> ('a', 'b,c') -> ('a', 'b', 'c') That means we can't do it when the call is forwarded, so this is only done on the CLI. The UI already sends values as a tuple. Replace escaping in the csv parser with quoting. Quoted strings can have embedded commas instead of having to escape them. This prevents the csv parser from eating all escape characters. Also, document Param's csv arguments, and update tests. https://fedorahosted.org/freeipa/ticket/2417 https://fedorahosted.org/freeipa/ticket/2227
* No longer shell escape the DM password when calling pkisilent.Rob Crittenden2012-03-212-16/+5
| | | | | | | | | pkisilent was modified to handle escaping characters itself in BZ https://bugzilla.redhat.com/show_bug.cgi?id=769388 This removes the workaround from ticket 1636. https://fedorahosted.org/freeipa/ticket/2529
* Added mac address to host pagePetr Vobornik2012-03-205-0/+17
| | | | | | Part of support for ether maps. https://fedorahosted.org/freeipa/ticket/2548
* DNS forwarder validatorPetr Vobornik2012-03-203-3/+36
| | | | | | | | DNS forwarder's value can consist of IP address and a port. The syntax is '<IP ADDRESS> port <PORT>'. A new validator was created for this purpose. It is based on IP address validator. https://fedorahosted.org/freeipa/ticket/2490
* Add support of new options in dnsconfigPetr Vobornik2012-03-203-1/+30
| | | | | | | | | | | dnsconfig was extended of new attributes, so reflecting it in UI. New attributes: * idnsForwardPolicy * idnsAllowSyncPTR * idnsZoneRefresh https://fedorahosted.org/freeipa/ticket/2489
* Add missing global options in dnsconfigMartin Kosek2012-03-204-4/+30
| | | | | | | | | | | Add a support for new global options in bind-dyndb-ldap, that is: * idnsforwardpolicy: Default policy for conditional forwarding * idnsallowsyncptr: Allow globaly PTR synchronization for dynamic updates * idnszonerefresh: Default interval between regular polls of the name server for new DNS zones https://fedorahosted.org/freeipa/ticket/2439
* Allow port numbers for idnsForwardersMartin Kosek2012-03-202-6/+29
| | | | | | | | Let user enter custom ports for zone conditional forwarders or global forwarders in dnsconfig. Ports can be specified in a standard BIND format: IP_ADDRESS [port PORT] https://fedorahosted.org/freeipa/ticket/2462
* Use a consistent parameter name in errors, defaulting to cli_name.Rob Crittenden2012-03-202-16/+24
| | | | | | | | For general command-line errors we want to use the cli_name on output. The exception is when using *attr, we want to return that attribute name in the exception. https://fedorahosted.org/freeipa/ticket/1418
* Fixed rpm build warning - extension.js listed twicePetr Vobornik2012-03-196-3/+19
| | | | | | | | | | | | | Building the ipa rpms returns this: warning: File listed twice: /usr/share/ipa/ui/extension.js This is because of a glob: %{_usr}/share/ipa/ui/*.js and then more specifically: %config(noreplace) %{_usr}/share/ipa/ui/extension.js https://fedorahosted.org/freeipa/ticket/2253
* Show_content on refresh successPetr Vobornik2012-03-195-0/+6
| | | | | | If an error content is displayed a successfull refresh doesn't show properly populated facet content. This patch adds show_content call to refresh success handlers which solves the problem. https://fedorahosted.org/freeipa/ticket/2449
* Content is no more overwritten by error messagePetr Vobornik2012-03-197-6/+119
| | | | | | | | | | | | | | | | | When an error which caused calling of report_error occurt, the content of a facet got replaced by error message. There was no way how to force the facet to recreate its content and the facet became unusable. This patch creates a containter for an error message. On error, report_error writes its content to error container, content container is hidden and error container is shown. Older comment in a code suggested to move the error message to facet's footer. A message in a footer could be missed by the user and on top of that a footer is sometimes used by various facet and we would have to solve the same problem again. From experience the cause of an error is usually a missing pkey in a path. Therefore error information suggests user to navigate to top level. It causes to load default facets with default values so errors in navigation state shouldn't happen. Facet content is displayed back on facet_show. If user tries to display same object as before facet's need_update() would return false, therefore need_update was modified to always return true if error is displayed. Reproduction: 1) display any nested entity - ie DNS record 2) delete its parent pkey from path - &dnszone-pkey=example.com 3) reload the page with this path https://fedorahosted.org/freeipa/ticket/2449
* Use nose tools to check for exceptionsPetr Viktorin2012-03-196-189/+105
| | | | | | | | | | | | | | | | Some of our tests checked for exceptions using an error-prone try block: they allowed the expected exception to pass, but sometimes forgot an else block, so the test passed when an exception wasn't thrown. This changes the tests to use the appropriate nose tools (raises, assert_raises). For consistency, tests that had a correct else block are also changed. Also fix some test problems that were hidden by the above: - in some sudorule and HBAC tests, change the *_add_user argument name from `users` to `user` - don't remove HBAC testing data while it was still used
* Don't allow hosts and services of IPA masters to be disabled.Rob Crittenden2012-03-195-8/+42
| | | | https://fedorahosted.org/freeipa/ticket/2487
* Import the ipaserver plugins based on context, not env.in_server.Rob Crittenden2012-03-191-1/+1
| | | | | | | | | in_server controls how a method is dispatched, it should not also control what plugins are imported. This suppresses the error message "session memcached servers not running." https://fedorahosted.org/freeipa/ticket/2499
* Remove ipausers' gidnumber from testsPetr Viktorin2012-03-141-1/+0
| | | | | The ipausers group is no longer a POSIX group by default. Reflect that in the tests.
* Add disovery domain if client domain is different from server domainLars Sjostrom2012-03-141-2/+6
| | | | https://fedorahosted.org/freeipa/ticket/2209
* Configure a basic ldap.conf for OpenLDAP in /etc/openldap/ldap.confRob Crittenden2012-03-142-1/+52
| | | | | | | | | Set URI, BASE and TLS_CACERT Also update the man page to include a list of files that the client changes. https://fedorahosted.org/freeipa/ticket/1810
* Better hbactest validation messagePetr Vobornik2012-03-155-17/+92
| | | | | | | | HBAC Test validation message contains all missing values in form of list of links instead of general 'missing values' message and redirection to first missing value's facet. When a link is clicked user is redirected to value's facet. https://fedorahosted.org/freeipa/ticket/2182
* Fixed evaluating checkbox dirty statusPetr Vobornik2012-03-154-18/+24
| | | | | | | | | | | | Problem: When value in checkbox is modified twice in a row (so it is at its original value) an 'undo' button is still visible even when it shouldn't be. Cause: IPA server sends boolean values as 'TRUE' or 'FALSE' (strings). Checkbox_widget converts them to JavaScript? boolean (true, false). Save method in checkbox_widget is returning array with a boolean. So test_dirty method always evaluates to dirty because 'FALSE' != false. This patch is fixing the problem. https://fedorahosted.org/freeipa/ticket/2494
* Treat UPGs correctly in winsync replicationMartin Kosek2012-03-152-11/+91
| | | | | | | | | | | | | | | | | | | | | | | | IPA winsync plugin failed to replicate users when default user group was non-posix even though User Private Groups (UPG) were enabled on the server. Both their uidNumber and gidNumber were empty and they missed essential object classes. When the default user group was made posix and UPG was disabled it did not set gidNumber to the default group gidNumber. This patch improves this behavior to set gidNumber correctly according to UPG configuration and the default group status (posix/non-posix). 4 situations can occur, the following list specifies what value is assigned to user gidNumber: 1) Default group posix, UPG enabled: gidNumber = UPG gidNumber 2) Default group posix, UPG disabled: gidNumber = default group gidNumber 3) Default group non-posix, UPG enabled: gidNumber = UPG gidNumber 4) Default group non-posix, UPG disabled: an error is printed to the dirsrv log as the gidNumber cannot be retrieved. User is replicated in the same way as before this patch, i.e. without essential object classes. https://fedorahosted.org/freeipa/ticket/2436