File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 92
92
default [ 'sysctl' ] [ 'params' ] [ 'net' ] [ 'ipv6' ] [ 'conf' ] [ 'default' ] [ 'accept_ra' ] = 0
93
93
94
94
# ExecShield protection against buffer overflows
95
- # unless node['platform'] == "ubuntu" # ["nx"].include?(node['cpu'][0]['flags']) or
96
95
case node [ 'platform_family' ]
97
96
when 'rhel' , 'fedora'
98
- default [ 'sysctl' ] [ 'params' ] [ 'kernel' ] [ 'exec-shield' ] = 1
97
+ # on RHEL 7 its enabled per default and can't be disabled
98
+ if node [ 'platform_version' ] . to_f < 7
99
+ default [ 'sysctl' ] [ 'params' ] [ 'kernel' ] [ 'exec-shield' ] = 1
100
+ end
99
101
end
100
102
101
103
# Virtual memory regions protection
Original file line number Diff line number Diff line change 32
32
supports 'redhat' , '>= 5.0'
33
33
supports 'oracle' , '>= 6.4'
34
34
35
- depends 'sysctl' , '>= 0.6.0'
35
+ # temporary version pinning of sysctl
36
+ # https://github.com/dev-sec/chef-os-hardening/issues/166#issuecomment-322433264
37
+ depends 'sysctl' , '<= 0.9.0'
36
38
depends 'compat_resource' , '>= 12.16.3'
37
39
38
40
recipe 'os-hardening::default' , 'harden the operating system (all recipes)'
You can’t perform that action at this time.
0 commit comments