Winsync re-initialize should not run memberOf fixup task

Change re-initialize command to consider memberOf fixup task only
for non-winsync replication agreements.

https://fedorahosted.org/freeipa/ticket/3854
This commit is contained in:
Martin Kosek
2013-10-11 09:40:45 +02:00
parent 524a1a8567
commit dfa135e606

View File

@@ -862,11 +862,12 @@ def re_initialize(realm, thishost, fromhost, dirman_passwd, nolookup=False):
repl.initialize_replication(agreement.dn, repl.conn)
repl.wait_for_repl_init(repl.conn, agreement.dn)
# If the agreement doesn't have nsDS5ReplicatedAttributeListTotal it means
# we did not replicate memberOf, do so now.
if not agreement.single_value('nsDS5ReplicatedAttributeListTotal', None):
ds = dsinstance.DsInstance(realm_name = realm, dm_password = dirman_passwd)
ds.init_memberof()
# If the agreement doesn't have nsDS5ReplicatedAttributeListTotal it means
# we did not replicate memberOf, do so now.
if not agreement.single_value('nsDS5ReplicatedAttributeListTotal', None):
ds = dsinstance.DsInstance(realm_name = realm, dm_password = dirman_passwd)
ds.ldapi = os.getegid() == 0
ds.init_memberof()
def force_sync(realm, thishost, fromhost, dirman_passwd, nolookup=False):