Skip to content

Commit

Permalink
fix in importing AY settings
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Feb 6, 2020
1 parent cda8eba commit a59af6c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/modules/Security.rb
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,19 @@ def Write
# @return [Boolean] True on success
def Import(settings)
settings = deep_copy(settings)
if settings.key?("KERNEL.SYSRQ")
settings["kernel.sysrq"] = settings["KERNEL.SYSRQ"]
end
if settings.key?("NET.IPV4.TCP_SYNCOOKIES")
settings["net.ipv4.tcp_syncookies"] = settings["NET.IPV4.TCP_SYNCOOKIES"]
end
if settings.key?("NET.IPV4.IP_FORWARD")
settings["net.ipv4.ip_forward"] = settings["NET.IPV4.IP_FORWARD"]
end
if settings.key?("NET.IPV6.CONF.ALL.FORWARDING")
settings["net.ipv6.conf.all.forwarding"] = settings["NET.IPV6.CONF.ALL.FORWARDING"]
end

return true if settings == {}

@modified = true
Expand Down

0 comments on commit a59af6c

Please sign in to comment.