From 87040c0af1e76b5477cd53d515ed8071d941ce24 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 12 Jul 2012 14:27:55 -0400 Subject: Fix safety checks to prevent orphaning replicas This is just a typo, we were checking one side twice and never the other side. So depending on which side you run the command you'd be able or not to remove the replication agreement even if it was the last one. First part of ticket: https://fedorahosted.org/freeipa/ticket/2925 --- install/tools/ipa-replica-manage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage index e23781738..a039ccaa2 100755 --- a/install/tools/ipa-replica-manage +++ b/install/tools/ipa-replica-manage @@ -211,7 +211,7 @@ def del_link(realm, replica1, replica2, dirman_passwd, force=False): try: repl2 = replication.ReplicationManager(realm, replica2, dirman_passwd) - repl_list = repl1.find_ipa_replication_agreements() + repl_list = repl2.find_ipa_replication_agreements() if not force and len(repl_list) <= 1: print "Cannot remove the last replication link of '%s'" % replica2 print "Please use the 'del' command to remove it from the domain" -- cgit