From 5fb1b2049889705d2cda60d745be5b1dacb23146 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 6 Aug 2019 18:00:50 +0000 Subject: [PATCH 3/8] Always initialize AD roles even if the IPA API is initialized The setting of these roles in the registry were guarded by whether the IPA API was initialized. If another plugin intialized the API then these values weren't being set, effectively disabling the AD Trust checks. https://github.com/freeipa/freeipa-healthcheck/issues/62 --- src/ipahealthcheck/ipa/plugin.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/ipahealthcheck/ipa/plugin.py b/src/ipahealthcheck/ipa/plugin.py index a73a7df..c4cef9b 100644 --- a/src/ipahealthcheck/ipa/plugin.py +++ b/src/ipahealthcheck/ipa/plugin.py @@ -40,15 +40,13 @@ class IPARegistry(Registry): def initialize(self, framework): installutils.check_server_configuration() - if api.isdone('finalize'): - return - - if not api.isdone('bootstrap'): - api.bootstrap(in_server=True, - context='ipahealthcheck', - log=None) if not api.isdone('finalize'): - api.finalize() + if not api.isdone('bootstrap'): + api.bootstrap(in_server=True, + context='ipahealthcheck', + log=None) + if not api.isdone('finalize'): + api.finalize() if not api.Backend.ldap2.isconnected(): try: -- 2.20.1