diff options
author | Simo Sorce <ssorce@redhat.com> | 2012-07-12 14:27:55 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-07-17 21:01:57 -0400 |
commit | 87040c0af1e76b5477cd53d515ed8071d941ce24 (patch) | |
tree | b265f135258a166df976dcee3cbc920487f56e08 | |
parent | 67dbde01567f5df414d4e5f6ac694c9b04170c45 (diff) | |
download | freeipa-87040c0af1e76b5477cd53d515ed8071d941ce24.tar.gz freeipa-87040c0af1e76b5477cd53d515ed8071d941ce24.tar.xz freeipa-87040c0af1e76b5477cd53d515ed8071d941ce24.zip |
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
-rwxr-xr-x | install/tools/ipa-replica-manage | 2 |
1 files changed, 1 insertions, 1 deletions
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" |