Fix ipa-replica-manage regressions with winsync

Avoids ipa-replica-manage to throw up errors.

Fixes: https://fedorahosted.org/freeipa/ticket/807
This commit is contained in:
Simo Sorce
2011-01-19 09:53:59 -05:00
parent 34cedfe138
commit 27da394c44
2 changed files with 6 additions and 3 deletions

View File

@@ -180,6 +180,7 @@ class DsInstance(service.Service):
self.dercert = None
self.idstart = None
self.idmax = None
self.subject_base = None
if realm_name:
self.suffix = util.realm_to_suffix(self.realm_name)
self.__setup_sub_dict()

View File

@@ -625,7 +625,8 @@ class ReplicationManager:
# there is no other side to get a replica ID from
# So we generate one locally
replica_id = self._get_replica_id(self.conn, self.conn)
self.basic_replication_setup(self.conn, replica_id)
self.basic_replication_setup(self.conn, replica_id,
self.repl_man_dn, self.repl_man_passwd)
#now add a passync user allowed to access the AD server
self.add_passsync_user(self.conn, passsync_pw)
@@ -638,8 +639,9 @@ class ReplicationManager:
logging.info("Agreement is ready, starting replication . . .")
#Finally start replication
return self.start_replication(self.conn, ad_conn,
self.repl_man_dn, self.repl_man_passwd)
ret = self.start_replication(ad_conn)
if ret != 0:
raise RuntimeError("Failed to start replication")
def convert_to_gssapi_replication(self, r_hostname, r_binddn, r_bindpw):
r_conn = ipaldap.IPAdmin(r_hostname, port=PORT, cacert=CACERT)