pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0157-disconnect-ldap2-backend-after-adding-default-CA-ACL.patch

2e9388
From 245f54de1d4e2189b1234000916a7d591fa151b9 Mon Sep 17 00:00:00 2001
2e9388
From: Martin Babinsky <mbabinsk@redhat.com>
2e9388
Date: Tue, 24 Nov 2015 14:43:10 +0100
2e9388
Subject: [PATCH] disconnect ldap2 backend after adding default CA ACL profiles
2e9388
2e9388
ensure_default_caacl() was leaking open api.Backend.ldap2 connection which
2e9388
could crash server/replica installation at later stages. This patch ensures
2e9388
that after checking default CA ACL profiles the backend is disconnected.
2e9388
2e9388
https://fedorahosted.org/freeipa/ticket/5459
2e9388
2e9388
Reviewed-By: Tomas Babej <tbabej@redhat.com>
2e9388
---
2e9388
 ipaserver/install/cainstance.py | 3 +++
2e9388
 1 file changed, 3 insertions(+)
2e9388
2e9388
diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
2e9388
index 189876f3c0d980e78165d73eed86b2830ac8c5b8..c72d11d1e0b86c040dc497744cda87aab22caafd 100644
2e9388
--- a/ipaserver/install/cainstance.py
2e9388
+++ b/ipaserver/install/cainstance.py
2e9388
@@ -1870,6 +1870,9 @@ def ensure_default_caacl():
2e9388
         api.Command.caacl_add_profile(u'hosts_services_caIPAserviceCert',
2e9388
             certprofile=(u'caIPAserviceCert',))
2e9388
 
2e9388
+    if api.Backend.ldap2.isconnected():
2e9388
+        api.Backend.ldap2.disconnect()
2e9388
+
2e9388
 
2e9388
 if __name__ == "__main__":
2e9388
     standard_logging_setup("install.log")
2e9388
-- 
2e9388
2.4.3
2e9388