483b06
From c7d19fca09f7398af63ceffb915afc9b5d507e1e Mon Sep 17 00:00:00 2001
483b06
From: Florence Blanc-Renaud <flo@redhat.com>
483b06
Date: Fri, 24 Mar 2017 11:02:33 +0100
483b06
Subject: [PATCH] dogtag-ipa-ca-renew-agent-submit: fix the is_replicated()
483b06
 function
483b06
483b06
dogtag-ipa-ca-renew-agent-submit behaves differently depending on the
483b06
certificate it needs to renew. For instance, some certificates (such as IPA RA)
483b06
are the same on all the hosts and the renewal is actually done only on
483b06
the renewal master. On other nodes, the new cert is downloaded from LDAP.
483b06
483b06
The function is_replicated() is returning the opposite as what it should. If
483b06
the cert nickname is IPA RA, it should return that the cert is replicated but
483b06
it doesn't, and this leads to a wrong code path to renew the cert.
483b06
483b06
https://pagure.io/freeipa/issue/6813
483b06
483b06
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
483b06
---
483b06
 install/certmonger/dogtag-ipa-ca-renew-agent-submit | 2 +-
483b06
 1 file changed, 1 insertion(+), 1 deletion(-)
483b06
483b06
diff --git a/install/certmonger/dogtag-ipa-ca-renew-agent-submit b/install/certmonger/dogtag-ipa-ca-renew-agent-submit
483b06
index cc690b8fa26854a5ab683915a5ba6a8d3c0d4ae4..5782db703c49d7c2e92c806e24e9925e8e7d710a 100755
483b06
--- a/install/certmonger/dogtag-ipa-ca-renew-agent-submit
483b06
+++ b/install/certmonger/dogtag-ipa-ca-renew-agent-submit
483b06
@@ -119,7 +119,7 @@ def is_renewable():
483b06
 
483b06
 
483b06
 def is_replicated():
483b06
-    return not get_nickname()
483b06
+    return bool(get_nickname())
483b06
 
483b06
 
483b06
 def is_renewal_master():
483b06
-- 
483b06
2.12.1
483b06