mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
committed by
Jan Cholasta
parent
80251e772b
commit
9d8ac395c0
@@ -74,26 +74,9 @@ class KRAInstall(admintool.AdminTool):
|
|||||||
|
|
||||||
installutils.check_server_configuration()
|
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.bootstrap(in_server=True)
|
||||||
api.finalize()
|
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
|
@classmethod
|
||||||
def get_command_class(cls, options, args):
|
def get_command_class(cls, options, args):
|
||||||
if options.uninstall:
|
if options.uninstall:
|
||||||
@@ -152,6 +135,12 @@ class KRAInstaller(KRAInstall):
|
|||||||
def validate_options(self, needs_root=True):
|
def validate_options(self, needs_root=True):
|
||||||
super(KRAInstaller, self).validate_options(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)
|
dogtag_version = int(api.env.dogtag_version)
|
||||||
enable_kra = api.env.enable_kra
|
enable_kra = api.env.enable_kra
|
||||||
|
|
||||||
@@ -187,6 +176,17 @@ class KRAInstaller(KRAInstall):
|
|||||||
self.option_parser.error("Too many parameters provided. "
|
self.option_parser.error("Too many parameters provided. "
|
||||||
"No replica file is required.")
|
"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):
|
def _run(self):
|
||||||
super(KRAInstaller, self).run()
|
super(KRAInstaller, self).run()
|
||||||
print dedent(self.INSTALLER_START_MESSAGE)
|
print dedent(self.INSTALLER_START_MESSAGE)
|
||||||
|
|||||||
Reference in New Issue
Block a user