|
|
e0ab38 |
From f7e06707be5c590ce03a50117da483931a0680c6 Mon Sep 17 00:00:00 2001
|
|
|
e0ab38 |
From: Martin Basti <mbasti@redhat.com>
|
|
|
e0ab38 |
Date: Tue, 5 Jan 2016 17:58:49 +0100
|
|
|
e0ab38 |
Subject: [PATCH] Allow to used mixed case for sysrestore
|
|
|
e0ab38 |
|
|
|
e0ab38 |
This commit allows to use mixed case of keys for sysrestore, before this
|
|
|
e0ab38 |
commit all keys were saved in lowercase what prevents to accesing them.
|
|
|
e0ab38 |
|
|
|
e0ab38 |
Original usage of mixed case for sysretore key in opendssecinstance had
|
|
|
e0ab38 |
to be changed to lowercase to prevent issues on already installed
|
|
|
e0ab38 |
systems.
|
|
|
e0ab38 |
|
|
|
e0ab38 |
https://fedorahosted.org/freeipa/ticket/5574
|
|
|
e0ab38 |
|
|
|
e0ab38 |
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
|
|
|
e0ab38 |
---
|
|
|
e0ab38 |
ipapython/sysrestore.py | 4 ++++
|
|
|
e0ab38 |
ipaserver/install/opendnssecinstance.py | 6 ++++--
|
|
|
e0ab38 |
2 files changed, 8 insertions(+), 2 deletions(-)
|
|
|
e0ab38 |
|
|
|
e0ab38 |
diff --git a/ipapython/sysrestore.py b/ipapython/sysrestore.py
|
|
|
e0ab38 |
index 1a111258bc0f6dd503673028d3a990821f077fef..97f0d760ae58c8d4bd0409565bf47167a689a06c 100644
|
|
|
e0ab38 |
--- a/ipapython/sysrestore.py
|
|
|
e0ab38 |
+++ b/ipapython/sysrestore.py
|
|
|
e0ab38 |
@@ -67,6 +67,7 @@ class FileStore:
|
|
|
e0ab38 |
self.files = {}
|
|
|
e0ab38 |
|
|
|
e0ab38 |
p = ConfigParser.SafeConfigParser()
|
|
|
e0ab38 |
+ p.optionxform = str
|
|
|
e0ab38 |
p.read(self._index)
|
|
|
e0ab38 |
|
|
|
e0ab38 |
for section in p.sections():
|
|
|
e0ab38 |
@@ -88,6 +89,7 @@ class FileStore:
|
|
|
e0ab38 |
return
|
|
|
e0ab38 |
|
|
|
e0ab38 |
p = ConfigParser.SafeConfigParser()
|
|
|
e0ab38 |
+ p.optionxform = str
|
|
|
e0ab38 |
|
|
|
e0ab38 |
p.add_section('files')
|
|
|
e0ab38 |
for (key, value) in self.files.items():
|
|
|
e0ab38 |
@@ -324,6 +326,7 @@ class StateFile:
|
|
|
e0ab38 |
self.modules = {}
|
|
|
e0ab38 |
|
|
|
e0ab38 |
p = ConfigParser.SafeConfigParser()
|
|
|
e0ab38 |
+ p.optionxform = str
|
|
|
e0ab38 |
p.read(self._path)
|
|
|
e0ab38 |
|
|
|
e0ab38 |
for module in p.sections():
|
|
|
e0ab38 |
@@ -352,6 +355,7 @@ class StateFile:
|
|
|
e0ab38 |
return
|
|
|
e0ab38 |
|
|
|
e0ab38 |
p = ConfigParser.SafeConfigParser()
|
|
|
e0ab38 |
+ p.optionxform = str
|
|
|
e0ab38 |
|
|
|
e0ab38 |
for module in self.modules.keys():
|
|
|
e0ab38 |
p.add_section(module)
|
|
|
e0ab38 |
diff --git a/ipaserver/install/opendnssecinstance.py b/ipaserver/install/opendnssecinstance.py
|
|
|
e0ab38 |
index c5377d910d8f38a1ea0e05461ecf1b92f05ca2ca..2ab320b8e5db6c7c4e03850ecfe26e0e178d04a1 100644
|
|
|
e0ab38 |
--- a/ipaserver/install/opendnssecinstance.py
|
|
|
e0ab38 |
+++ b/ipaserver/install/opendnssecinstance.py
|
|
|
e0ab38 |
@@ -265,11 +265,11 @@ class OpenDNSSECInstance(service.Service):
|
|
|
e0ab38 |
|
|
|
e0ab38 |
def __setup_dnssec(self):
|
|
|
e0ab38 |
# run once only
|
|
|
e0ab38 |
- if self.get_state("KASP_DB_configured") and not self.kasp_db_file:
|
|
|
e0ab38 |
+ if self.get_state("kasp_db_configured") and not self.kasp_db_file:
|
|
|
e0ab38 |
root_logger.debug("Already configured, skipping step")
|
|
|
e0ab38 |
return
|
|
|
e0ab38 |
|
|
|
e0ab38 |
- self.backup_state("KASP_DB_configured", True)
|
|
|
e0ab38 |
+ self.backup_state("kasp_db_configured", True)
|
|
|
e0ab38 |
|
|
|
e0ab38 |
if not self.fstore.has_file(paths.OPENDNSSEC_KASP_DB):
|
|
|
e0ab38 |
self.fstore.backup_file(paths.OPENDNSSEC_KASP_DB)
|
|
|
e0ab38 |
@@ -368,6 +368,8 @@ class OpenDNSSECInstance(service.Service):
|
|
|
e0ab38 |
root_logger.debug(error)
|
|
|
e0ab38 |
pass
|
|
|
e0ab38 |
|
|
|
e0ab38 |
+ self.restore_state("kasp_db_configured") # just eat state
|
|
|
e0ab38 |
+
|
|
|
e0ab38 |
# disabled by default, by ldap_enable()
|
|
|
e0ab38 |
if enabled:
|
|
|
e0ab38 |
self.enable()
|
|
|
e0ab38 |
--
|
|
|
e0ab38 |
2.4.3
|
|
|
e0ab38 |
|