The Identity, Policy and Audit system
CentOS Sources
2016-11-03 403b09ab980c02ef36095973349a13e0181c794a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
From 620dced81e4ef95522fcaf50c0b3e060f911754f Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jcholast@redhat.com>
Date: Tue, 16 Aug 2016 17:34:06 +0200
Subject: [PATCH] server install: do not prompt for cert file PIN repeatedly
 
Prompt for PIN only once in interactive mode.
 
This fixes ipa-server-install, ipa-server-certinstall and
ipa-replica-prepare prompting over and over when the PIN is empty.
 
https://fedorahosted.org/freeipa/ticket/6032
 
Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
---
 ipaserver/install/ipa_replica_prepare.py    | 6 +++---
 ipaserver/install/ipa_server_certinstall.py | 3 ++-
 ipaserver/install/server/install.py         | 6 +++---
 3 files changed, 8 insertions(+), 7 deletions(-)
 
diff --git a/ipaserver/install/ipa_replica_prepare.py b/ipaserver/install/ipa_replica_prepare.py
index fdd32f0c8437a0d8c3947d57089662ea09bb2304..80813086c6a7212bdb6ef9d54202b28808b80076 100644
--- a/ipaserver/install/ipa_replica_prepare.py
+++ b/ipaserver/install/ipa_replica_prepare.py
@@ -303,7 +303,7 @@ class ReplicaPrepare(admintool.AdminTool):
             if options.http_pin is None:
                 options.http_pin = installutils.read_password(
                     "Enter Apache Server private key unlock",
-                    confirm=False, validate=False)
+                    confirm=False, validate=False, retry=False)
                 if options.http_pin is None:
                     raise admintool.ScriptError(
                         "Apache Server private key unlock password required")
@@ -317,7 +317,7 @@ class ReplicaPrepare(admintool.AdminTool):
             if options.dirsrv_pin is None:
                 options.dirsrv_pin = installutils.read_password(
                     "Enter Directory Server private key unlock",
-                    confirm=False, validate=False)
+                    confirm=False, validate=False, retry=False)
                 if options.dirsrv_pin is None:
                     raise admintool.ScriptError(
                         "Directory Server private key unlock password required")
@@ -331,7 +331,7 @@ class ReplicaPrepare(admintool.AdminTool):
             if options.pkinit_pin is None:
                 options.pkinit_pin = installutils.read_password(
                     "Enter Kerberos KDC private key unlock",
-                    confirm=False, validate=False)
+                    confirm=False, validate=False, retry=False)
                 if options.pkinit_pin is None:
                     raise admintool.ScriptError(
                         "Kerberos KDC private key unlock password required")
diff --git a/ipaserver/install/ipa_server_certinstall.py b/ipaserver/install/ipa_server_certinstall.py
index 5ab47303add479c7c492c251b0cf6646de681a4b..0a8fb214a232e60a89b6c06940b928f97c007b93 100644
--- a/ipaserver/install/ipa_server_certinstall.py
+++ b/ipaserver/install/ipa_server_certinstall.py
@@ -92,7 +92,8 @@ class ServerCertInstall(admintool.AdminTool):
 
         if self.options.pin is None:
             self.options.pin = installutils.read_password(
-                "Enter private key unlock", confirm=False, validate=False)
+                "Enter private key unlock",
+                confirm=False, validate=False, retry=False)
             if self.options.pin is None:
                 raise admintool.ScriptError(
                     "Private key unlock password required")
diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py
index 86b8402750b503ea7dacd1f4c59c82d9bd4082e6..b33b0243d4d909a561b59d93f0014c390146b333 100644
--- a/ipaserver/install/server/install.py
+++ b/ipaserver/install/server/install.py
@@ -488,7 +488,7 @@ def install_check(installer):
         if options.http_pin is None:
             options.http_pin = installutils.read_password(
                 "Enter Apache Server private key unlock",
-                confirm=False, validate=False)
+                confirm=False, validate=False, retry=False)
             if options.http_pin is None:
                 sys.exit(
                     "Apache Server private key unlock password required")
@@ -504,7 +504,7 @@ def install_check(installer):
         if options.dirsrv_pin is None:
             options.dirsrv_pin = read_password(
                 "Enter Directory Server private key unlock",
-                confirm=False, validate=False)
+                confirm=False, validate=False, retry=False)
             if options.dirsrv_pin is None:
                 sys.exit(
                     "Directory Server private key unlock password required")
@@ -520,7 +520,7 @@ def install_check(installer):
         if options.pkinit_pin is None:
             options.pkinit_pin = read_password(
                 "Enter Kerberos KDC private key unlock",
-                confirm=False, validate=False)
+                confirm=False, validate=False, retry=False)
             if options.pkinit_pin is None:
                 sys.exit(
                     "Kerberos KDC private key unlock password required")
-- 
2.9.3