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 9292default [ 'sysctl' ] [ 'params' ] [ 'net' ] [ 'ipv6' ] [ 'conf' ] [ 'default' ] [ 'accept_ra' ] = 0
9393
9494# ExecShield protection against buffer overflows
95- # unless node['platform'] == "ubuntu" # ["nx"].include?(node['cpu'][0]['flags']) or
9695case node [ 'platform_family' ]
9796when '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
99101end
100102
101103# Virtual memory regions protection
Original file line number Diff line number Diff line change 3232supports 'redhat' , '>= 5.0'
3333supports 'oracle' , '>= 6.4'
3434
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'
3638depends 'compat_resource' , '>= 12.16.3'
3739
3840recipe 'os-hardening::default' , 'harden the operating system (all recipes)'
You can’t perform that action at this time.
0 commit comments