summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-manage
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-08-13 09:38:24 +0200
committerRob Crittenden <rcritten@redhat.com>2012-08-12 23:26:16 -0400
commit6341eff07891dfd4ed253081eb056ff6eb5aa573 (patch)
treee11d50cfa179389dc05b1405653e5afe581b0cc3 /install/tools/ipa-replica-manage
parent94d457e83c172320707fbf13f7a1587dad128ece (diff)
downloadfreeipa-6341eff07891dfd4ed253081eb056ff6eb5aa573.tar.gz
freeipa-6341eff07891dfd4ed253081eb056ff6eb5aa573.tar.xz
freeipa-6341eff07891dfd4ed253081eb056ff6eb5aa573.zip
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
Diffstat (limited to 'install/tools/ipa-replica-manage')
-rwxr-xr-xinstall/tools/ipa-replica-manage7
1 files changed, 3 insertions, 4 deletions
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")