Class: Ardecy::Harden::Sysctl::Kernel::Printk
- Defined in:
- lib/ardecy/harden/sysctl/kernel.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Printk
constructor
A new instance of Printk.
- #scan ⇒ Object
Methods inherited from SysKern
Methods included from Display
#display_fix_list, #kernel_show, #perm_show, #result, #show_bad_mod, #title
Constructor Details
#initialize(args) ⇒ Printk
Returns a new instance of Printk.
49 50 51 52 53 54 55 |
# File 'lib/ardecy/harden/sysctl/kernel.rb', line 49 def initialize(args) @file = '/proc/sys/kernel/printk' @line = 'kernel.printk' @tab = 6 super @exp = '3 3 3 3' end |
Instance Method Details
#scan ⇒ Object
57 58 59 60 61 62 |
# File 'lib/ardecy/harden/sysctl/kernel.rb', line 57 def scan kernel_show(@line, @exp) if @args[:audit] value = File.read(@file).chomp @res = 'OK' if value =~ /3\s+3\s+3\s+3/ result(@res) if @args[:audit] end |