HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/platform.rb
module Puppet
  module Util
    module Platform
      FIPS_STATUS_FILE = "/proc/sys/crypto/fips_enabled".freeze
      WINDOWS_FIPS_REGISTRY_KEY = 'System\\CurrentControlSet\\Control\\Lsa\\FipsAlgorithmPolicy'.freeze

      def windows?
        # Ruby only sets File::ALT_SEPARATOR on Windows and the Ruby standard
        # library uses that to test what platform it's on. In some places we
        # would use Puppet.features.microsoft_windows?, but this method can be
        # used to determine the behavior of the underlying system without
        # requiring features to be initialized and without side effect.
        !!File::ALT_SEPARATOR
      end
      module_function :windows?

      def solaris?
        RUBY_PLATFORM.include?('solaris')
      end
      module_function :solaris?

      def default_paths
        return [] if windows?

        %w{/usr/sbin /sbin}
      end
      module_function :default_paths

      @fips_enabled = if windows?
                        require 'win32/registry'

                        begin
                          Win32::Registry::HKEY_LOCAL_MACHINE.open(WINDOWS_FIPS_REGISTRY_KEY) do |reg|
                            reg.values.first == 1
                          end
                        rescue Win32::Registry::Error
                          false
                        end
                      else
                        File.exist?(FIPS_STATUS_FILE) &&
                          File.read(FIPS_STATUS_FILE, 1) == '1'
                      end

      def fips_enabled?
        @fips_enabled
      end
      module_function :fips_enabled?

      def self.jruby?
        RUBY_PLATFORM == 'java'
      end

      def jruby_fips?
        @@jruby_fips ||= if RUBY_PLATFORM == 'java'
                           require 'java'

                           begin
                             require 'openssl'
                             false
                           rescue LoadError, NameError
                             true
                           end
                         else
                           false
                         end
      end
      module_function :jruby_fips?
    end
  end
end