[Pki-devel] [PATCH] 603 Fixed overwritten deployment property.
Endi Sukma Dewata
edewata at redhat.com
Fri May 29 20:55:10 UTC 2015
On 5/29/2015 2:20 PM, Endi Sukma Dewata wrote:
> The deployment tool has been modified to avoid overwriting the
> property default value by moving the assignment after all the
> properties are added.
>
> https://fedorahosted.org/pki/ticket/1393
Removed the property from the default.cfg instead.
ACKed by alee. Pushed to master.
--
Endi S. Dewata
-------------- next part --------------
>From ea2341c5078b1a518b55456ad71661758dab325e Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata at redhat.com>
Date: Fri, 29 May 2015 15:04:40 -0400
Subject: [PATCH] Fixed overwritten deployment property.
The pki_pin has been removed from the default.cfg to avoid
overwriting the randomly generated default value.
https://fedorahosted.org/pki/ticket/1393
---
base/server/etc/default.cfg | 1 -
base/server/python/pki/server/deployment/pkiparser.py | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/base/server/etc/default.cfg b/base/server/etc/default.cfg
index fd4347900c6fd602b00f7cf84fde74f432e860ed..58f338692ac4f1c2637b575e27db2bec6254905b 100644
--- a/base/server/etc/default.cfg
+++ b/base/server/etc/default.cfg
@@ -99,7 +99,6 @@ pki_issuing_ca_hostname=%(pki_security_domain_hostname)s
pki_issuing_ca_https_port=%(pki_security_domain_https_port)s
pki_issuing_ca_uri=https://%(pki_issuing_ca_hostname)s:%(pki_issuing_ca_https_port)s
pki_issuing_ca=%(pki_issuing_ca_uri)s
-pki_pin=
pki_replication_password=
pki_restart_configured_instance=True
pki_security_domain_hostname=%(pki_hostname)s
diff --git a/base/server/python/pki/server/deployment/pkiparser.py b/base/server/python/pki/server/deployment/pkiparser.py
index fe1a54a3ade302a201372287cd43c9058436f917..7e1813c75b891466600117998559c6c1c714ef94 100644
--- a/base/server/python/pki/server/deployment/pkiparser.py
+++ b/base/server/python/pki/server/deployment/pkiparser.py
@@ -566,7 +566,7 @@ class PKIConfigParser:
pin_high = 999999999999
# use user-provided PIN if specified
- if not self.mdict['pki_pin']:
+ if 'pki_pin' not in self.mdict:
# otherwise generate a random password
self.mdict['pki_pin'] = \
random.randint(pin_low, pin_high)
--
1.9.3
More information about the Pki-devel
mailing list