[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pki-devel] [PATCH] 603 Fixed overwritten deployment property.



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
>From ea2341c5078b1a518b55456ad71661758dab325e Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]