https://fedorahosted.org/freeipa/ticket/5574

Patch attached.



From cffa75803ba38587a4002107df76558a77120262 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Tue, 5 Jan 2016 17:58:49 +0100
Subject: [PATCH] Allow to used mixed case for sysrestore

This commit allows to use mixed case of keys for sysrestore, before this
commit all keys were saved in lowercase what prevents to accesing them.

Original usage of mixed case for sysretore key in opendssecinstance had
to be changed to lowercase to prevent issues on already installed
systems.

https://fedorahosted.org/freeipa/ticket/5574
---
 ipapython/sysrestore.py                 | 3 +++
 ipaserver/install/opendnssecinstance.py | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/ipapython/sysrestore.py b/ipapython/sysrestore.py
index 65ef5da898a58a9e42804314a45872770b11c80e..5d6b30f5a0194f360f96e8ed2048fe1266d343c4 100644
--- a/ipapython/sysrestore.py
+++ b/ipapython/sysrestore.py
@@ -71,6 +71,7 @@ class FileStore:
         self.files = {}
 
         p = SafeConfigParser()
+        p.optionxform = str
         p.read(self._index)
 
         for section in p.sections():
@@ -92,6 +93,7 @@ class FileStore:
             return
 
         p = SafeConfigParser()
+        p.optionxform = str
 
         p.add_section('files')
         for (key, value) in self.files.items():
@@ -355,6 +357,7 @@ class StateFile:
             return
 
         p = SafeConfigParser()
+        p.optionxform = str
 
         for module in self.modules.keys():
             p.add_section(module)
diff --git a/ipaserver/install/opendnssecinstance.py b/ipaserver/install/opendnssecinstance.py
index 1c6aaeefaf10df21dde29a467fcfc2713b2d6c2c..4d3b65ff990fef87134bfd333ad65694feac925f 100644
--- a/ipaserver/install/opendnssecinstance.py
+++ b/ipaserver/install/opendnssecinstance.py
@@ -268,11 +268,11 @@ class OpenDNSSECInstance(service.Service):
 
     def __setup_dnssec(self):
         # run once only
-        if self.get_state("KASP_DB_configured") and not self.kasp_db_file:
+        if self.get_state("kasp_db_configured") and not self.kasp_db_file:
             root_logger.debug("Already configured, skipping step")
             return
 
-        self.backup_state("KASP_DB_configured", True)
+        self.backup_state("kasp_db_configured", True)
 
         if not self.fstore.has_file(paths.OPENDNSSEC_KASP_DB):
             self.fstore.backup_file(paths.OPENDNSSEC_KASP_DB)
@@ -377,7 +377,7 @@ class OpenDNSSECInstance(service.Service):
             except ValueError as error:
                 root_logger.debug(error)
 
-        self.restore_state("KASP_DB_configured")  # just eat state
+        self.restore_state("kasp_db_configured")  # just eat state
 
         # disabled by default, by ldap_enable()
         if enabled:
-- 
2.5.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to