diff options
author | John Dennis <jdennis@redhat.com> | 2012-04-16 08:33:26 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-04-16 08:35:12 +0200 |
commit | 46391e99561be0213ff90273c4fef5827f76cd07 (patch) | |
tree | 69f0b77b71cecfc4382a46f639ea1844c06df9bf /API.txt | |
parent | 85d634c108d4b38678ac7bc6076a8512722d7d16 (diff) | |
download | freeipa.git-46391e99561be0213ff90273c4fef5827f76cd07.tar.gz freeipa.git-46391e99561be0213ff90273c4fef5827f76cd07.tar.xz freeipa.git-46391e99561be0213ff90273c4fef5827f76cd07.zip |
Validate DN & RDN parameters for migrate command
Ticket #2555
We were generating a traceback (server error) if a malformed RDN was
passed as a parameter to the migrate command.
* add parameter validation functions validate_dn_param() and
validate_rdn_param() to ipalib.util. Those functions simply invoke
the DN or RDN constructor from our dn module passing it the string
representation. If the constructor does not throw an error it's
valid.
* Add the parameter validation function pointers to the Param objects
in the migrate command.
* Make the usercontainer and groupcontainer parameters required.
passing --usercontainer= on the command line will produce
ipa: ERROR: 'user_container' is required
* Fix _get_search_bases() so if a container dn is empty it it just
uses the base dn alone instead of faulting (currently
bullet-proofing because now the containers are required).
* Update the doc for usercontainer and groupcontainer to reflect the
fact they are DN's not RDN's. A RDN can only be one level and it
should be possible to have a container more than one RDN removed
from the base.
Diffstat (limited to 'API.txt')
-rw-r--r-- | API.txt | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1900,8 +1900,8 @@ args: 2,16,4 arg: Str('ldapuri', cli_name='ldap_uri') arg: Password('bindpw', cli_name='password', confirm=False) option: Str('binddn?', autofill=True, cli_name='bind_dn', default=u'cn=directory manager') -option: Str('usercontainer?', autofill=True, cli_name='user_container', default=u'ou=people') -option: Str('groupcontainer?', autofill=True, cli_name='group_container', default=u'ou=groups') +option: Str('usercontainer', autofill=True, cli_name='user_container', default=u'ou=people') +option: Str('groupcontainer', autofill=True, cli_name='group_container', default=u'ou=groups') option: Str('userobjectclass*', autofill=True, cli_name='user_objectclass', csv=True, default=(u'person',)) option: Str('groupobjectclass*', autofill=True, cli_name='group_objectclass', csv=True, default=(u'groupOfUniqueNames', u'groupOfNames')) option: Str('userignoreobjectclass*', autofill=True, cli_name='user_ignore_objectclass', csv=True, default=()) |