Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions default/serverspec/sysctl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,16 @@
describe 'ExecShield' do

# GIS: Req 3.21-5
# check if we find the nx flag
if command('cat /proc/cpuinfo').return_stdout?(/^flags.*?:.*? nx( .*?)?$/)
context linux_kernel_parameter('kernel.exec-shield') do
its(:value) { should eq 1 }
end
true
else
# if no nx flag is present, we require exec-shield
context 'No nx flag detected' do
it 'no kernel.exec-shield required' do
true
it 'require kernel.exec-shield' do
context linux_kernel_parameter('kernel.exec-shield') do
its(:value) { should eq 1 }
end
end
end
end
Expand Down