[Pki-devel] [PATCH] 0034 fix pkispawn for non-CA subsystems

Fraser Tweedale ftweedal at redhat.com
Wed Apr 22 01:59:13 UTC 2015


Bug in code that chooses the profile subsystem (LDAP vs files)
causes errors spawning non-CA instances. Fix attached.
-------------- next part --------------
>From 922e237279fcf8ce9827f0e3cbed904758ad5123 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale <frase at frase.id.au>
Date: Tue, 21 Apr 2015 21:07:39 -0400
Subject: [PATCH] Only read pki_profiles_in_ldap when spawning CA instance

---
 base/server/python/pki/server/deployment/pkiparser.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/base/server/python/pki/server/deployment/pkiparser.py b/base/server/python/pki/server/deployment/pkiparser.py
index e93f1717e09904d021fbdccdb3124b6a7fd8f6a1..7d82c18fc17f1037086df12a22c764231a1c50ff 100644
--- a/base/server/python/pki/server/deployment/pkiparser.py
+++ b/base/server/python/pki/server/deployment/pkiparser.py
@@ -718,6 +718,10 @@ class PKIConfigParser:
                             "ee",
                             self.mdict['pki_subsystem'].lower(),
                             "ProfileSelect.template")
+                    if config.str2bool(self.mdict['pki_profiles_in_ldap']):
+                        self.mdict['PKI_PROFILE_SUBSYSTEM_SLOT'] = 'LDAPProfileSubsystem'
+                    else:
+                        self.mdict['PKI_PROFILE_SUBSYSTEM_SLOT'] = 'ProfileSubsystem'
                 elif self.mdict['pki_subsystem'] == "KRA":
                     # '*.profile'
                     self.mdict['pki_target_servercert_profile'] = \
@@ -1231,11 +1235,6 @@ class PKIConfigParser:
                     "pki-tomcatd" + "@" + \
                     self.mdict['pki_instance_name'] + "." + "service"
 
-            if config.str2bool(self.mdict['pki_profiles_in_ldap']):
-                self.mdict['PKI_PROFILE_SUBSYSTEM_SLOT'] = 'LDAPProfileSubsystem'
-            else:
-                self.mdict['PKI_PROFILE_SUBSYSTEM_SLOT'] = 'ProfileSubsystem'
-
         except OSError as exc:
             config.pki_log.error(log.PKI_OSERROR_1, exc,
                                  extra=config.PKI_INDENTATION_LEVEL_2)
-- 
2.1.0



More information about the Pki-devel mailing list