lib/inspec/resources/linux_audit_system.rb
def enabled?
      auditctl_cmd = inspec.command("#{auditctl_utility} -s | grep enabled")

      raise Inspec::Exceptions::ResourceFailed, "Executing #{auditctl_utility} -s | grep enabled failed: #{auditctl_cmd.stderr}" if auditctl_cmd.exit_status.to_i != 0

      # Sample stdout: enabled 1
      auditctl_enabled_status = auditctl_cmd.stdout.strip.split
      auditctl_enabled_status[1].to_i == 1
    end
# The be_enabled matcher checks if the auditing is enabled.
# The enabled flag 1 indicates that the auditing is enabled.
The be_enabled matcher checks if the auditing is enabled.
The enabled flag 1 indicates that the auditing is enabled.
The be_enabled matcher checks if the auditing is enabled . The enabled flag 1 indicates that the auditing is enabled .
def enabled?
      auditctl_cmd = inspec.command("#{auditctl_utility} -s | grep enabled")
      raise Inspec::Exceptions::ResourceFailed, "Executing #{auditctl_utility} -s | grep enabled failed: #{auditctl_cmd.stderr}" if auditctl_cmd.exit_status.to_i != 0
      auditctl_enabled_status = auditctl_cmd.stdout.strip.split
      auditctl_enabled_status[1].to_i == 1
    end
def enabled? auditctl_cmd = inspec . command ( "#{auditctl_utility} -s | grep enabled" ) raise Inspec :: Exceptions :: ResourceFailed , "Executing #{auditctl_utility} -s | grep enabled failed: #{auditctl_cmd.stderr}" if auditctl_cmd . exit_status . to_i != 0 auditctl_enabled_status = auditctl_cmd . stdout . strip . split auditctl_enabled_status [ 1 ] . to_i == 1 end
The be_enabled matcher checks if the auditing is enabled.
The be_enabled matcher checks if the auditing is enabled .
# Sample stdout: enabled 1