From 6341eff07891dfd4ed253081eb056ff6eb5aa573 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Mon, 13 Aug 2012 09:38:24 +0200 Subject: Fix winsync agreements creation Due to recent addition of ID range support to DsInstance, the class could no longer be instantiated when realm_name was passed but ID range parameters were not. This condition broke winsync agreements creation in ipa-replica-manage. Make sure that ID range computation in DsInstance does not crash in this cases so that winsync replica can be created. Also convert --binddn option of ipa-replica-manage script to IPA native DN type so that setup_agreement does not crash. https://fedorahosted.org/freeipa/ticket/2987 --- install/tools/ipa-replica-manage | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'install') diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage index b2e819d1e..cabc0106f 100755 --- a/install/tools/ipa-replica-manage +++ b/install/tools/ipa-replica-manage @@ -31,6 +31,7 @@ from ipapython import version from ipalib import api, errors, util from ipapython.ipa_log_manager import * from ipapython.dn import DN +from ipapython.config import IPAOptionParser CACERT = "/etc/ipa/ca.crt" @@ -48,16 +49,14 @@ commands = { } def parse_options(): - from optparse import OptionParser - - parser = OptionParser(version=version.VERSION) + parser = IPAOptionParser(version=version.VERSION) parser.add_option("-H", "--host", dest="host", help="starting host") parser.add_option("-p", "--password", dest="dirman_passwd", help="Directory Manager password") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", default=False, help="provide additional information") parser.add_option("-f", "--force", dest="force", action="store_true", default=False, help="ignore some types of errors") - parser.add_option("--binddn", dest="binddn", default=None, + parser.add_option("--binddn", dest="binddn", default=None, type="dn", help="Bind DN to use with remote server") parser.add_option("--bindpw", dest="bindpw", default=None, help="Password for Bind DN to use with remote server") -- cgit