Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Feb 18, 2020
1 parent 6c0ebb7 commit b35caaf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/Security.rb
Original file line number Diff line number Diff line change
Expand Up @@ -730,16 +730,16 @@ def Write
def Import(settings)
settings = deep_copy(settings)
if settings.key?("KERNEL.SYSRQ")
settings["kernel.sysrq"] = settings["KERNEL.SYSRQ"]
settings["kernel.sysrq"] = settings.delete["KERNEL.SYSRQ"]
end
if settings.key?("NET.IPV4.TCP_SYNCOOKIES")
settings["net.ipv4.tcp_syncookies"] = settings["NET.IPV4.TCP_SYNCOOKIES"]
settings["net.ipv4.tcp_syncookies"] = settings.delete["NET.IPV4.TCP_SYNCOOKIES"]
end
if settings.key?("NET.IPV4.IP_FORWARD")
settings["net.ipv4.ip_forward"] = settings["NET.IPV4.IP_FORWARD"]
settings["net.ipv4.ip_forward"] = settings.delete["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"]
settings["net.ipv6.conf.all.forwarding"] = settings.delete["NET.IPV6.CONF.ALL.FORWARDING"]
end

return true if settings == {}
Expand Down

0 comments on commit b35caaf

Please sign in to comment.