Sha256: ee8edb754928979bce6b57ddfe0279ed0ff1e448fb53290e8fc3f0a89c901202

Contents?: true

Size: 666 Bytes

Versions: 29

Compression:

Stored size: 666 Bytes

Contents

# frozen_string_literal: true

module Facter
  module Resolvers
    module Linux
      class FipsEnabled < BaseResolver
        #:fips_enabled

        init_resolver

        @log = Facter::Log.new(self)

        class << self
          private

          def post_resolve(fact_name, _options)
            @fact_list.fetch(fact_name) { read_fips_file(fact_name) }
          end

          def read_fips_file(fact_name)
            file_output = Facter::Util::FileHelper.safe_read('/proc/sys/crypto/fips_enabled')
            @fact_list[:fips_enabled] = file_output.strip == '1'
            @fact_list[fact_name]
          end
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
facter-4.5.2 lib/facter/resolvers/fips_enabled.rb
facter-4.5.1 lib/facter/resolvers/fips_enabled.rb
facter-4.5.0 lib/facter/resolvers/fips_enabled.rb
facter-4.4.3 lib/facter/resolvers/fips_enabled.rb
facter-4.4.2 lib/facter/resolvers/fips_enabled.rb
facter-4.4.1 lib/facter/resolvers/fips_enabled.rb
facter-4.4.0 lib/facter/resolvers/fips_enabled.rb
facter-4.3.1 lib/facter/resolvers/fips_enabled.rb
facter-4.3.0 lib/facter/resolvers/fips_enabled.rb
facter-4.2.14 lib/facter/resolvers/fips_enabled.rb
facter-4.2.13 lib/facter/resolvers/fips_enabled.rb
facter-4.2.12 lib/facter/resolvers/fips_enabled.rb
facter-4.2.11 lib/facter/resolvers/fips_enabled.rb
facter-4.2.10 lib/facter/resolvers/fips_enabled.rb
facter-4.2.9 lib/facter/resolvers/fips_enabled.rb
facter-4.2.8 lib/facter/resolvers/fips_enabled.rb
facter-4.2.7 lib/facter/resolvers/fips_enabled.rb
facter-4.2.6 lib/facter/resolvers/fips_enabled.rb
facter-4.2.5 lib/facter/resolvers/fips_enabled.rb
facter-4.2.4 lib/facter/resolvers/fips_enabled.rb