Module: Puppet::Util::Platform Private
- Defined in:
- lib/puppet/util/platform.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- FIPS_STATUS_FILE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"/proc/sys/crypto/fips_enabled"
- WINDOWS_FIPS_REGISTRY_KEY =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'System\\CurrentControlSet\\Control\\Lsa\\FipsAlgorithmPolicy'
Class Method Summary collapse
- .default_paths ⇒ Object private
- .fips_enabled? ⇒ Boolean private
- .jruby? ⇒ Boolean private
- .jruby_fips? ⇒ Boolean private
- .solaris? ⇒ Boolean private
- .windows? ⇒ Boolean private
Class Method Details
.default_paths ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 27 |
# File 'lib/puppet/util/platform.rb', line 23 def default_paths return [] if windows? %w{/usr/sbin /sbin} end |
.fips_enabled? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
45 46 47 |
# File 'lib/puppet/util/platform.rb', line 45 def fips_enabled? @fips_enabled end |
.jruby? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 |
# File 'lib/puppet/util/platform.rb', line 50 def self.jruby? RUBY_PLATFORM == 'java' end |
.jruby_fips? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/puppet/util/platform.rb', line 54 def jruby_fips? @@jruby_fips ||= if RUBY_PLATFORM == 'java' require 'java' begin require 'openssl' false rescue LoadError, NameError true end else false end end |
.solaris? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'lib/puppet/util/platform.rb', line 18 def solaris? RUBY_PLATFORM.include?('solaris') end |
.windows? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 11 12 13 14 15 |
# File 'lib/puppet/util/platform.rb', line 8 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 |