Add check for Exec-Shield
parent
d87fef5ee3
commit
0481cbffe6
|
@ -123,6 +123,18 @@ module Kernel
|
|||
raise 'Could not determine ASLR status'
|
||||
end
|
||||
|
||||
#
|
||||
# Returns true if Exec-Shield is enabled
|
||||
#
|
||||
# @return [Boolean]
|
||||
#
|
||||
def exec_shield_enabled?
|
||||
exec_shield = cmd_exec('cat /proc/sys/kernel/exec-shield').to_s.strip
|
||||
(exec_shield.eql?('1') || exec_shield.eql?('2'))
|
||||
rescue
|
||||
raise 'Could not determine exec-shield status'
|
||||
end
|
||||
|
||||
#
|
||||
# Returns true if unprivileged bpf is disabled
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue