1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

Apply firewall rules only if firewall is explicitly enabled

This commit is contained in:
Игорь Чудов 2020-07-03 18:23:42 +04:00
parent a6defe8c41
commit 6f68917355
Signed by untrusted user: nir
GPG Key ID: 0F3883600CAE7AAC

View File

@ -53,13 +53,13 @@ class firewall_applier(applier_frontend):
def apply(self):
if self.__module_enabled:
logging.debug(slogm('Running Firewall applier for machine'))
if '0' == self.firewall_enabled:
if '1' == self.firewall_enabled:
logging.debug(slogm('Firewall is enabled'))
self.run()
else:
logging.debug(slogm('Firewall is disabled, settings will be reset'))
proc = subprocess.Popen(self.__firewall_reset_cmd)
proc.wait()
else:
logging.debug(slogm('Firewall is enabled'))
self.run()
else:
logging.debug(slogm('Firewall applier will not be started'))