mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
Do not restore SELinux settings that were not backed up
https://fedorahosted.org/freeipa/ticket/4678 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
parent
52b141ca6a
commit
a14ce85357
@ -152,7 +152,8 @@ class BaseTaskNamespace(object):
|
||||
|
||||
:param required_settings: A dictionary mapping the boolean names
|
||||
to desired_values.
|
||||
The desired value can be 'on' or 'off'.
|
||||
The desired value can be 'on' or 'off',
|
||||
or None to leave the setting unchanged.
|
||||
|
||||
:param backup_func: A function called for each boolean with two
|
||||
arguments: the name and the previous value
|
||||
|
@ -363,6 +363,8 @@ class RedHatTaskNamespace(BaseTaskNamespace):
|
||||
updated_vars = {}
|
||||
failed_vars = {}
|
||||
for setting, state in required_settings.iteritems():
|
||||
if state is None:
|
||||
continue
|
||||
try:
|
||||
(stdout, stderr, rc) = ipautil.run([paths.GETSEBOOL, setting])
|
||||
original_state = stdout.split()[2]
|
||||
|
Loading…
Reference in New Issue
Block a user