Sha256: 2e82fd9ec500c0414cc764baa6bbf455e714721cacbbe4d36abb706147842f9b

Contents?: true

Size: 680 Bytes

Versions: 20

Compression:

Stored size: 680 Bytes

Contents

# frozen_string_literal: true

module Facter
  module Resolvers
    module Linux
      class FipsEnabled < BaseResolver
        #:fips_enabled
        @semaphore = Mutex.new
        @fact_list ||= {}
        @log = Facter::Log.new(self)
        class << self
          private

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

          def read_fips_file(fact_name)
            file_output = 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

20 entries across 20 versions & 1 rubygems

Version Path
facter-4.0.36 lib/facter/resolvers/fips_enabled_resolver.rb
facter-4.0.35 lib/facter/resolvers/fips_enabled_resolver.rb
facter-4.0.34 lib/facter/resolvers/fips_enabled_resolver.rb
facter-4.0.33 lib/facter/resolvers/fips_enabled_resolver.rb
facter-4.0.32 lib/facter/resolvers/fips_enabled_resolver.rb
facter-4.0.31 lib/facter/resolvers/fips_enabled_resolver.rb
facter-4.0.30 lib/facter/resolvers/fips_enabled_resolver.rb
facter-4.0.29 lib/resolvers/fips_enabled_resolver.rb
facter-4.0.28 lib/resolvers/fips_enabled_resolver.rb
facter-4.0.26 lib/resolvers/fips_enabled_resolver.rb
facter-4.0.25 lib/resolvers/fips_enabled_resolver.rb
facter-4.0.24 lib/resolvers/fips_enabled_resolver.rb
facter-4.0.23 lib/resolvers/fips_enabled_resolver.rb
facter-4.0.22 lib/resolvers/fips_enabled_resolver.rb
facter-4.0.21 lib/resolvers/fips_enabled_resolver.rb
facter-4.0.20 lib/resolvers/fips_enabled_resolver.rb
facter-4.0.19 lib/resolvers/fips_enabled_resolver.rb
facter-4.0.18 lib/resolvers/fips_enabled_resolver.rb
facter-4.0.17 lib/resolvers/fips_enabled_resolver.rb
facter-4.0.16 lib/resolvers/fips_enabled_resolver.rb