https://fedorahosted.org/freeipa/ticket/5028
-- Martin^3 Babinsky
From 96aae7a619c808e979699b56b5905e1e836a4f8b Mon Sep 17 00:00:00 2001 From: Martin Babinsky <mbabi...@redhat.com> Date: Tue, 19 May 2015 13:01:27 +0200 Subject: [PATCH] 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 --- ipaserver/install/ipa_kra_install.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ipaserver/install/ipa_kra_install.py b/ipaserver/install/ipa_kra_install.py index 099737fa9ae3ad5bbfb36772cb0ced9c676043f4..53b3cf413e56d2b45678e0b7abfa49ba32d3c2cb 100644 --- a/ipaserver/install/ipa_kra_install.py +++ b/ipaserver/install/ipa_kra_install.py @@ -74,19 +74,13 @@ 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: + 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) @@ -116,6 +110,9 @@ class KRAUninstaller(KRAInstall): "Cannot uninstall. There is no KRA installed on this system." ) + def ask_for_options(self): + pass + def run(self): super(KRAUninstaller, self).run() dogtag_constants = dogtag.configured_constants() @@ -152,6 +149,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 -- 2.1.0
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code