Skip to content

Commit

Permalink
Merge pull request #14 from TelekomLabs/exec-shield
Browse files Browse the repository at this point in the history
fix exec-shield test
  • Loading branch information
Patrick Meier committed Jun 17, 2014
2 parents 3d6eee9 + ecf1f87 commit 2bd0000
Showing 1 changed file with 7 additions and 5 deletions.
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

0 comments on commit 2bd0000

Please sign in to comment.