summaryrefslogtreecommitdiffstats
path: root/ipaserver/install
diff options
context:
space:
mode:
authorMartin Babinsky <mbabinsk@redhat.com>2015-05-19 13:01:27 +0200
committerJan Cholasta <jcholast@redhat.com>2015-05-20 13:13:29 +0000
commit9d8ac395c00e48c95f8fdccbc05d43dd144f82ad (patch)
treee19f56290a41d88e23cdc62f972b08ffc4c1a0ec /ipaserver/install
parent80251e772bf48219abc77b507c4cab6d0127c7b6 (diff)
downloadfreeipa-9d8ac395c00e48c95f8fdccbc05d43dd144f82ad.tar.gz
freeipa-9d8ac395c00e48c95f8fdccbc05d43dd144f82ad.tar.xz
freeipa-9d8ac395c00e48c95f8fdccbc05d43dd144f82ad.zip
do not check for directory manager password during KRA uninstall
ipa-kra-install validates and asks for directory manager password during uninstallation phase. Since this password is never used during service uninstall, the uninstaller will not perform these checks anymore. https://fedorahosted.org/freeipa/ticket/5028 Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipaserver/install')
-rw-r--r--ipaserver/install/ipa_kra_install.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/ipaserver/install/ipa_kra_install.py b/ipaserver/install/ipa_kra_install.py
index 099737fa9..386da286a 100644
--- a/ipaserver/install/ipa_kra_install.py
+++ b/ipaserver/install/ipa_kra_install.py
@@ -74,26 +74,9 @@ class KRAInstall(admintool.AdminTool):
installutils.check_server_configuration()
- if self.options.unattended and self.options.password is None:
- self.option_parser.error(
- "Directory Manager password must be specified using -p"
- " in unattended mode"
- )
-
api.bootstrap(in_server=True)
api.finalize()
- def ask_for_options(self):
- super(KRAInstall, self).ask_for_options()
-
- if not self.options.password:
- self.options.password = installutils.read_password(
- "Directory Manager", confirm=False,
- validate=False, retry=False)
- if self.options.password is None:
- raise admintool.ScriptError(
- "Directory Manager password required")
-
@classmethod
def get_command_class(cls, options, args):
if options.uninstall:
@@ -152,6 +135,12 @@ class KRAInstaller(KRAInstall):
def validate_options(self, needs_root=True):
super(KRAInstaller, self).validate_options(needs_root=True)
+ if self.options.unattended and self.options.password is None:
+ self.option_parser.error(
+ "Directory Manager password must be specified using -p"
+ " in unattended mode"
+ )
+
dogtag_version = int(api.env.dogtag_version)
enable_kra = api.env.enable_kra
@@ -187,6 +176,17 @@ class KRAInstaller(KRAInstall):
self.option_parser.error("Too many parameters provided. "
"No replica file is required.")
+ def ask_for_options(self):
+ super(KRAInstaller, self).ask_for_options()
+
+ if not self.options.unattended and self.options.password is None:
+ self.options.password = installutils.read_password(
+ "Directory Manager", confirm=False,
+ validate=False, retry=False)
+ if self.options.password is None:
+ raise admintool.ScriptError(
+ "Directory Manager password required")
+
def _run(self):
super(KRAInstaller, self).run()
print dedent(self.INSTALLER_START_MESSAGE)