puppet 7.26.0-x64-mingw32 → 7.27.0-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Gemfile.lock +15 -15
  4. data/ext/project_data.yaml +2 -2
  5. data/lib/puppet/application/ssl.rb +42 -7
  6. data/lib/puppet/application.rb +5 -1
  7. data/lib/puppet/functions/split.rb +28 -1
  8. data/lib/puppet/node/environment.rb +6 -4
  9. data/lib/puppet/pops/time/timespan.rb +1 -1
  10. data/lib/puppet/provider/package/apt.rb +1 -1
  11. data/lib/puppet/provider/package/dnf.rb +1 -1
  12. data/lib/puppet/provider/package/yum.rb +1 -1
  13. data/lib/puppet/util/execution.rb +7 -2
  14. data/lib/puppet/util/windows/adsi.rb +7 -0
  15. data/lib/puppet/util/windows/sid.rb +4 -2
  16. data/lib/puppet/version.rb +1 -1
  17. data/lib/puppet/x509/cert_provider.rb +6 -2
  18. data/man/man5/puppet.conf.5 +2 -2
  19. data/man/man8/puppet-agent.8 +1 -1
  20. data/man/man8/puppet-apply.8 +1 -1
  21. data/man/man8/puppet-catalog.8 +1 -1
  22. data/man/man8/puppet-config.8 +1 -1
  23. data/man/man8/puppet-describe.8 +1 -1
  24. data/man/man8/puppet-device.8 +1 -1
  25. data/man/man8/puppet-doc.8 +1 -1
  26. data/man/man8/puppet-epp.8 +1 -1
  27. data/man/man8/puppet-facts.8 +1 -1
  28. data/man/man8/puppet-filebucket.8 +1 -1
  29. data/man/man8/puppet-generate.8 +1 -1
  30. data/man/man8/puppet-help.8 +1 -1
  31. data/man/man8/puppet-lookup.8 +1 -1
  32. data/man/man8/puppet-module.8 +1 -1
  33. data/man/man8/puppet-node.8 +1 -1
  34. data/man/man8/puppet-parser.8 +1 -1
  35. data/man/man8/puppet-plugin.8 +1 -1
  36. data/man/man8/puppet-report.8 +1 -1
  37. data/man/man8/puppet-resource.8 +1 -1
  38. data/man/man8/puppet-script.8 +1 -1
  39. data/man/man8/puppet-ssl.8 +5 -1
  40. data/man/man8/puppet.8 +2 -2
  41. data/spec/integration/type/exec_spec.rb +13 -0
  42. data/spec/unit/application/ssl_spec.rb +49 -0
  43. data/spec/unit/file_system/path_pattern_spec.rb +15 -0
  44. data/spec/unit/functions/split_spec.rb +6 -0
  45. data/spec/unit/ssl/certificate_signer_spec.rb +17 -0
  46. data/spec/unit/ssl/ssl_provider_spec.rb +2 -2
  47. data/spec/unit/util/execution_spec.rb +1 -0
  48. data/spec/unit/util/windows/adsi_spec.rb +25 -0
  49. metadata +9 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61de86103de710b22ef0e4e8aa452ec62c559079fae673af4a1dbde55ff895bf
4
- data.tar.gz: b4194a13ab7e9f12eb46a82d5995e483b203ed578be64b9b39fd1d77e1f6199a
3
+ metadata.gz: d41010906b1adc6a7a0adfd744491185d0f30171e60340a8bd85122a50e1505c
4
+ data.tar.gz: 682f12641fdef56f5a9966bd9ceb3ef5c4040b8fbc78cb2047b95b6f1e9d4249
5
5
  SHA512:
6
- metadata.gz: 539f675ed0494194a06bbcd27a02b0bed0e270e5a9fd25fcf3e81d86677da09ab977d158b3d69f4116e3720e838fb986eee591047173d51fa264fc171a958524
7
- data.tar.gz: 04ed925c840517e266cf62475897d32e6564f6bef383e3c57d0f144d89df13a584c21f4e95170f97d4fb8a71c6c7167f5e28dceb0591ba57c86771a84dae6da9
6
+ metadata.gz: 7eef6b330b73c3e055c180ce7a9aa089d3623b351453164311e4ba47cb84dbf6d6b1f13bb849dece67aca217f64ab81003b1bbac5dc5daef25af222b9e01ae9e
7
+ data.tar.gz: 5babca90f6a026d264cc36c681b5a7de11955801b52ca25f64185106c8997429546caa3c66a906a177c3ec32261e303ab382f6bcc35b545f37a0e32bc7089c51
data/Gemfile CHANGED
@@ -35,7 +35,7 @@ group(:features) do
35
35
  end
36
36
 
37
37
  group(:test) do
38
- gem "ffi", require: false
38
+ gem "ffi", '1.15.5', require: false
39
39
  gem "json-schema", "~> 2.0", require: false
40
40
  gem "rake", *location_for(ENV['RAKE_LOCATION'] || '~> 13.0')
41
41
  gem "rspec", "~> 3.1", require: false
data/Gemfile.lock CHANGED
@@ -1,6 +1,6 @@
1
1
  GIT
2
2
  remote: https://github.com/puppetlabs/packaging
3
- revision: affecba5dfacc5862fc7199895ccf11b69153570
3
+ revision: 8adf33f59cc443c311c5d5d70c6ba2084625ceea
4
4
  branch: 1.0.x
5
5
  specs:
6
6
  packaging (0)
@@ -15,7 +15,7 @@ GIT
15
15
  PATH
16
16
  remote: .
17
17
  specs:
18
- puppet (7.26.0)
18
+ puppet (7.27.0)
19
19
  CFPropertyList (~> 2.2)
20
20
  concurrent-ruby (~> 1.0)
21
21
  deep_merge (~> 1.0)
@@ -37,6 +37,7 @@ GEM
37
37
  docopt
38
38
  artifactory (3.0.15)
39
39
  ast (2.4.2)
40
+ base64 (0.1.1)
40
41
  coderay (1.1.3)
41
42
  concurrent-ruby (1.2.2)
42
43
  crack (0.4.5)
@@ -48,10 +49,11 @@ GEM
48
49
  digest-crc (0.6.5)
49
50
  rake (>= 12.0.0, < 14.0.0)
50
51
  docopt (0.6.1)
51
- facter (4.4.2)
52
+ facter (4.5.0)
52
53
  hocon (~> 1.3)
53
54
  thor (>= 1.0.1, < 2.0)
54
- faraday (2.7.10)
55
+ faraday (2.7.11)
56
+ base64
55
57
  faraday-net_http (>= 2.0, < 3.1)
56
58
  ruby2_keywords (>= 0.0.4)
57
59
  faraday-net_http (3.0.2)
@@ -91,10 +93,9 @@ GEM
91
93
  google-cloud-core (~> 1.6)
92
94
  googleauth (>= 0.16.2, < 2.a)
93
95
  mini_mime (~> 1.0)
94
- googleauth (1.7.0)
96
+ googleauth (1.8.1)
95
97
  faraday (>= 0.17.3, < 3.a)
96
98
  jwt (>= 1.4, < 3.0)
97
- memoist (~> 0.16)
98
99
  multi_json (~> 1.11)
99
100
  os (>= 0.9, < 2.0)
100
101
  signet (>= 0.16, < 2.a)
@@ -111,7 +112,6 @@ GEM
111
112
  addressable (>= 2.4)
112
113
  jwt (2.7.1)
113
114
  locale (2.1.3)
114
- memoist (0.16.2)
115
115
  memory_profiler (1.0.1)
116
116
  method_source (1.0.0)
117
117
  mini_mime (1.1.5)
@@ -122,7 +122,7 @@ GEM
122
122
  optimist (3.1.0)
123
123
  os (1.1.4)
124
124
  parallel (1.23.0)
125
- parser (3.2.2.3)
125
+ parser (3.2.2.4)
126
126
  ast (~> 2.4.1)
127
127
  racc
128
128
  pry (0.14.2)
@@ -138,7 +138,7 @@ GEM
138
138
  rake (13.0.6)
139
139
  rdiscount (2.2.7.1)
140
140
  rdoc (6.3.3)
141
- regexp_parser (2.8.1)
141
+ regexp_parser (2.8.2)
142
142
  release-metrics (1.1.0)
143
143
  csv
144
144
  docopt
@@ -186,18 +186,18 @@ GEM
186
186
  ruby2_keywords (0.0.5)
187
187
  scanf (1.0.0)
188
188
  semantic_puppet (1.1.0)
189
- signet (0.17.0)
189
+ signet (0.18.0)
190
190
  addressable (~> 2.8)
191
191
  faraday (>= 0.17.5, < 3.a)
192
192
  jwt (>= 1.5, < 3.0)
193
193
  multi_json (~> 1.10)
194
194
  text (1.3.1)
195
- thor (1.2.2)
195
+ thor (1.3.0)
196
196
  trailblazer-option (0.1.2)
197
197
  uber (0.1.0)
198
- unicode-display_width (2.4.2)
198
+ unicode-display_width (2.5.0)
199
199
  vcr (5.1.0)
200
- webmock (3.18.1)
200
+ webmock (3.19.1)
201
201
  addressable (>= 2.8.0)
202
202
  crack (>= 0.3.2)
203
203
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -209,7 +209,7 @@ PLATFORMS
209
209
 
210
210
  DEPENDENCIES
211
211
  diff-lcs (~> 1.3)
212
- ffi
212
+ ffi (= 1.15.5)
213
213
  gettext-setup (~> 0.28)
214
214
  hiera-eyaml
215
215
  hocon (~> 1.0)
@@ -238,4 +238,4 @@ DEPENDENCIES
238
238
  yard
239
239
 
240
240
  BUNDLED WITH
241
- 2.4.12
241
+ 2.4.20
@@ -40,11 +40,11 @@ gem_platform_dependencies:
40
40
  CFPropertyList: '~> 2.2'
41
41
  x86-mingw32:
42
42
  gem_runtime_dependencies:
43
- ffi: ['> 1.9.24', '< 2']
43
+ ffi: '1.15.5'
44
44
  minitar: '~> 0.9'
45
45
  x64-mingw32:
46
46
  gem_runtime_dependencies:
47
- ffi: ['> 1.9.24', '< 2']
47
+ ffi: '1.15.5'
48
48
  minitar: '~> 0.9'
49
49
  bundle_platforms:
50
50
  universal-darwin: all
@@ -59,6 +59,11 @@ ACTIONS
59
59
  the CSR. Otherwise a new key pair will be generated. If a CSR has already
60
60
  been submitted with the given `certname`, then the operation will fail.
61
61
 
62
+ * generate_request:
63
+ Generate a certificate signing request (CSR). If
64
+ a private and public key pair already exist, they will be used to generate
65
+ the CSR. Otherwise a new key pair will be generated.
66
+
62
67
  * download_cert:
63
68
  Download a certificate for this host. If the current private key matches
64
69
  the downloaded certificate, then the certificate will be saved and used
@@ -136,9 +141,21 @@ HELP
136
141
  unless cert
137
142
  raise Puppet::Error, _("The certificate for '%{name}' has not yet been signed") % { name: certname }
138
143
  end
144
+ when 'generate_request'
145
+ generate_request(certname)
139
146
  when 'verify'
140
147
  verify(certname)
141
148
  when 'clean'
149
+ possible_extra_args = command_line.args.drop(1)
150
+ unless possible_extra_args.empty?
151
+ raise Puppet::Error, _(<<END) % { args: possible_extra_args.join(' ')}
152
+ Extra arguments detected: %{args}
153
+ Did you mean to run:
154
+ puppetserver ca clean --certname <name>
155
+ Or:
156
+ puppet ssl clean --target <name>
157
+ END
158
+ end
142
159
  clean(certname)
143
160
  when 'bootstrap'
144
161
  if !Puppet::Util::Log.sendlevel?(:info)
@@ -162,13 +179,7 @@ HELP
162
179
  def submit_request(ssl_context)
163
180
  key = @cert_provider.load_private_key(Puppet[:certname])
164
181
  unless key
165
- if Puppet[:key_type] == 'ec'
166
- Puppet.info _("Creating a new EC SSL key for %{name} using curve %{curve}") % { name: Puppet[:certname], curve: Puppet[:named_curve] }
167
- key = OpenSSL::PKey::EC.generate(Puppet[:named_curve])
168
- else
169
- Puppet.info _("Creating a new SSL key for %{name}") % { name: Puppet[:certname] }
170
- key = OpenSSL::PKey::RSA.new(Puppet[:keylength].to_i)
171
- end
182
+ key = create_key(Puppet[:certname])
172
183
  @cert_provider.save_private_key(Puppet[:certname], key)
173
184
  end
174
185
 
@@ -187,6 +198,20 @@ HELP
187
198
  raise Puppet::Error.new(_("Failed to submit certificate request: %{message}") % { message: e.message }, e)
188
199
  end
189
200
 
201
+ def generate_request(certname)
202
+ key = @cert_provider.load_private_key(certname)
203
+ unless key
204
+ key = create_key(certname)
205
+ @cert_provider.save_private_key(certname, key)
206
+ end
207
+
208
+ csr = @cert_provider.create_request(certname, key)
209
+ @cert_provider.save_request(certname, csr)
210
+ Puppet.notice _("Generated certificate request in '%{path}'") % { path: @cert_provider.to_path(Puppet[:requestdir], certname) }
211
+ rescue => e
212
+ raise Puppet::Error.new(_("Failed to generate certificate request: %{message}") % { message: e.message }, e)
213
+ end
214
+
190
215
  def download_cert(ssl_context)
191
216
  key = @cert_provider.load_private_key(Puppet[:certname])
192
217
 
@@ -285,4 +310,14 @@ END
285
310
  def create_route(ssl_context)
286
311
  @session.route_to(:ca, ssl_context: ssl_context)
287
312
  end
313
+
314
+ def create_key(certname)
315
+ if Puppet[:key_type] == 'ec'
316
+ Puppet.info _("Creating a new EC SSL key for %{name} using curve %{curve}") % { name: certname, curve: Puppet[:named_curve] }
317
+ OpenSSL::PKey::EC.generate(Puppet[:named_curve])
318
+ else
319
+ Puppet.info _("Creating a new SSL key for %{name}") % { name: certname }
320
+ OpenSSL::PKey::RSA.new(Puppet[:keylength].to_i)
321
+ end
322
+ end
288
323
  end
@@ -503,8 +503,12 @@ class Application
503
503
  runtime_info = {
504
504
  'puppet_version' => Puppet.version,
505
505
  'ruby_version' => RUBY_VERSION,
506
- 'run_mode' => self.class.run_mode.name,
506
+ 'run_mode' => self.class.run_mode.name
507
507
  }
508
+ unless Puppet::Util::Platform.jruby_fips?
509
+ runtime_info['openssl_version'] = "'#{OpenSSL::OPENSSL_VERSION}'"
510
+ runtime_info['openssl_fips'] = OpenSSL::OPENSSL_FIPS
511
+ end
508
512
  runtime_info['default_encoding'] = Encoding.default_external
509
513
  runtime_info.merge!(extra_info) unless extra_info.nil?
510
514
 
@@ -35,6 +35,21 @@ Puppet::Functions.create_function(:split) do
35
35
  param 'Type[Regexp]', :pattern
36
36
  end
37
37
 
38
+ dispatch :split_String_sensitive do
39
+ param 'Sensitive[String]', :sensitive
40
+ param 'String', :pattern
41
+ end
42
+
43
+ dispatch :split_Regexp_sensitive do
44
+ param 'Sensitive[String]', :sensitive
45
+ param 'Regexp', :pattern
46
+ end
47
+
48
+ dispatch :split_RegexpType_sensitive do
49
+ param 'Sensitive[String]', :sensitive
50
+ param 'Type[Regexp]', :pattern
51
+ end
52
+
38
53
  def split_String(str, pattern)
39
54
  str.split(Regexp.compile(pattern))
40
55
  end
@@ -46,4 +61,16 @@ Puppet::Functions.create_function(:split) do
46
61
  def split_RegexpType(str, pattern)
47
62
  str.split(pattern.regexp)
48
63
  end
49
- end
64
+
65
+ def split_String_sensitive(sensitive, pattern)
66
+ Puppet::Pops::Types::PSensitiveType::Sensitive.new(split_String(sensitive.unwrap, pattern))
67
+ end
68
+
69
+ def split_Regexp_sensitive(sensitive, pattern)
70
+ Puppet::Pops::Types::PSensitiveType::Sensitive.new(split_Regexp(sensitive.unwrap, pattern))
71
+ end
72
+
73
+ def split_RegexpType_sensitive(sensitive, pattern)
74
+ Puppet::Pops::Types::PSensitiveType::Sensitive.new(split_RegexpType(sensitive.unwrap, pattern))
75
+ end
76
+ end
@@ -591,10 +591,12 @@ class Puppet::Node::Environment
591
591
  if file == NO_MANIFEST
592
592
  empty_parse_result
593
593
  elsif File.directory?(file)
594
- parse_results = Puppet::FileSystem::PathPattern.absolute(File.join(file, '**/*.pp')).glob.sort.map do | file_to_parse |
595
- parser.file = file_to_parse
596
- parser.parse
597
- end
594
+ # JRuby does not properly perform Dir.glob operations with wildcards, (see PUP-11788 and https://github.com/jruby/jruby/issues/7836).
595
+ # We sort the results because Dir.glob order is inconsistent in Ruby < 3 (see PUP-10115).
596
+ parse_results = Puppet::FileSystem::PathPattern.absolute(File.join(file, '**/*')).glob.select {|globbed_file| globbed_file.end_with?('.pp')}.sort.map do | file_to_parse |
597
+ parser.file = file_to_parse
598
+ parser.parse
599
+ end
598
600
  # Use a parser type specific merger to concatenate the results
599
601
  Puppet::Parser::AST::Hostclass.new('', :code => Puppet::Parser::ParserFactory.code_merger.concatenate(parse_results))
600
602
  else
@@ -633,7 +633,7 @@ module Time
633
633
  position = -1
634
634
  fstart = 0
635
635
 
636
- str.codepoints do |codepoint|
636
+ str.each_codepoint do |codepoint|
637
637
  position += 1
638
638
  if state == STATE_LITERAL
639
639
  if codepoint == 0x25 # '%'
@@ -12,7 +12,7 @@ Puppet::Type.type(:package).provide :apt, :parent => :dpkg, :source => :dpkg do
12
12
  These options should be specified as an array where each element is either a
13
13
  string or a hash."
14
14
 
15
- has_feature :versionable, :install_options, :virtual_packages
15
+ has_feature :versionable, :install_options, :virtual_packages, :version_ranges
16
16
 
17
17
  commands :aptget => "/usr/bin/apt-get"
18
18
  commands :aptcache => "/usr/bin/apt-cache"
@@ -9,7 +9,7 @@ Puppet::Type.type(:package).provide :dnf, :parent => :yum do
9
9
  These options should be specified as an array where each element is either
10
10
  a string or a hash."
11
11
 
12
- has_feature :install_options, :versionable, :virtual_packages, :install_only
12
+ has_feature :install_options, :versionable, :virtual_packages, :install_only, :version_ranges
13
13
 
14
14
  commands :cmd => "dnf", :rpm => "rpm"
15
15
 
@@ -15,7 +15,7 @@ Puppet::Type.type(:package).provide :yum, :parent => :rpm, :source => :rpm do
15
15
  This provider supports the `install_options` attribute, which allows command-line flags to be passed to yum.
16
16
  These options should be specified as an array where each element is either a string or a hash."
17
17
 
18
- has_feature :install_options, :versionable, :virtual_packages, :install_only
18
+ has_feature :install_options, :versionable, :virtual_packages, :install_only, :version_ranges
19
19
 
20
20
  RPM_VERSION = Puppet::Util::Package::Version::Rpm
21
21
  RPM_VERSION_RANGE = Puppet::Util::Package::Version::Range
@@ -222,8 +222,12 @@ module Puppet::Util::Execution
222
222
  # Use non-blocking read to check for data. After each attempt,
223
223
  # check whether the child is done. This is done in case the child
224
224
  # forks and inherits stdout, as happens in `foo &`.
225
-
226
- until results = Process.waitpid2(child_pid, Process::WNOHANG) #rubocop:disable Lint/AssignmentInCondition
225
+ # If we encounter EOF, though, then switch to a blocking wait for
226
+ # the child; after EOF, IO.select will never block and the loop
227
+ # below will use maximum CPU available.
228
+
229
+ wait_flags = Process::WNOHANG
230
+ until results = Process.waitpid2(child_pid, wait_flags) #rubocop:disable Lint/AssignmentInCondition
227
231
 
228
232
  # If not done, wait for data to read with a timeout
229
233
  # This timeout is selected to keep activity low while waiting on
@@ -234,6 +238,7 @@ module Puppet::Util::Execution
234
238
  output << reader.read_nonblock(4096) if ready
235
239
  rescue Errno::EAGAIN
236
240
  rescue EOFError
241
+ wait_flags = 0
237
242
  end
238
243
  end
239
244
 
@@ -175,6 +175,13 @@ module Puppet::Util::Windows::ADSI
175
175
  sids = []
176
176
  adsi_child_collection.each do |m|
177
177
  sids << Puppet::Util::Windows::SID.ads_to_principal(m)
178
+ rescue Puppet::Util::Windows::Error => e
179
+ case e.code
180
+ when Puppet::Util::Windows::SID::ERROR_TRUSTED_RELATIONSHIP_FAILURE, Puppet::Util::Windows::SID::ERROR_TRUSTED_DOMAIN_FAILURE
181
+ sids << Puppet::Util::Windows::SID.unresolved_principal(m.name, m.sid)
182
+ else
183
+ raise e
184
+ end
178
185
  end
179
186
 
180
187
  sids
@@ -6,8 +6,10 @@ module Puppet::Util::Windows
6
6
  extend FFI::Library
7
7
 
8
8
  # missing from Windows::Error
9
- ERROR_NONE_MAPPED = 1332
10
- ERROR_INVALID_SID_STRUCTURE = 1337
9
+ ERROR_NONE_MAPPED = 1332
10
+ ERROR_INVALID_SID_STRUCTURE = 1337
11
+ ERROR_TRUSTED_DOMAIN_FAILURE = 1788
12
+ ERROR_TRUSTED_RELATIONSHIP_FAILURE = 1789
11
13
 
12
14
  # Well Known SIDs
13
15
  Null = 'S-1-0'
@@ -6,7 +6,7 @@
6
6
  # Raketasks and such to set the version based on the output of `git describe`
7
7
 
8
8
  module Puppet
9
- PUPPETVERSION = '7.26.0'
9
+ PUPPETVERSION = '7.27.0'
10
10
 
11
11
  ##
12
12
  # version is a public API method intended to always provide a fast and
@@ -346,13 +346,17 @@ class Puppet::X509::CertProvider
346
346
  OpenSSL::X509::Request.new(pem)
347
347
  end
348
348
 
349
- private
350
-
349
+ # Return the path to the cert related object (key, CSR, cert, etc).
350
+ #
351
+ # @param base [String] base directory
352
+ # @param name [String] the name associated with the cert related object
351
353
  def to_path(base, name)
352
354
  raise _("Certname %{name} must not contain unprintable or non-ASCII characters") % { name: name.inspect } unless name =~ VALID_CERTNAME
353
355
  File.join(base, "#{name.downcase}.pem")
354
356
  end
355
357
 
358
+ private
359
+
356
360
  def permissions_for_setting(name)
357
361
  setting = Puppet.settings.setting(name)
358
362
  perm = { mode: setting.mode.to_i(8) }
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPETCONF" "5" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPETCONF" "5" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  \fBThis page is autogenerated; any changes will get overwritten\fR
6
6
  .
7
7
  .SH "Configuration settings"
@@ -945,7 +945,7 @@ The time to wait for data to be read from an HTTP connection\. If nothing is rea
945
945
  The HTTP User\-Agent string to send when making network requests\.
946
946
  .
947
947
  .IP "\(bu" 4
948
- \fIDefault\fR: \fBPuppet/7\.26\.0 Ruby/2\.7\.5\-p203 (x86_64\-linux)\fR
948
+ \fIDefault\fR: \fBPuppet/7\.27\.0 Ruby/2\.7\.5\-p203 (x86_64\-linux)\fR
949
949
  .
950
950
  .IP "" 0
951
951
  .
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-AGENT" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-AGENT" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-agent\fR \- The puppet agent daemon
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-APPLY" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-APPLY" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-apply\fR \- Apply Puppet manifests locally
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-CATALOG" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CATALOG" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-catalog\fR \- Compile, save, view, and convert catalogs\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-CONFIG" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CONFIG" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-config\fR \- Interact with Puppet\'s settings\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-DESCRIBE" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DESCRIBE" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-describe\fR \- Display help about resource types
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-DEVICE" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DEVICE" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-device\fR \- Manage remote network devices
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-DOC" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DOC" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-doc\fR \- Generate Puppet references
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-EPP" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-EPP" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-epp\fR \- Interact directly with the EPP template parser/renderer\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-FACTS" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-FACTS" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-facts\fR \- Retrieve and store facts\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-FILEBUCKET" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-FILEBUCKET" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-filebucket\fR \- Store and retrieve files in a filebucket
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-GENERATE" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-GENERATE" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-generate\fR \- Generates Puppet code from Ruby definitions\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-HELP" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-HELP" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-help\fR \- Display Puppet help\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-LOOKUP" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-LOOKUP" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-lookup\fR \- Interactive Hiera lookup
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-MODULE" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-MODULE" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-module\fR \- Creates, installs and searches for modules on the Puppet Forge\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-NODE" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-NODE" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-node\fR \- View and manage node definitions\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-PARSER" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-PARSER" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-parser\fR \- Interact directly with the parser\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-PLUGIN" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-PLUGIN" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-plugin\fR \- Interact with the Puppet plugin system\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-REPORT" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-REPORT" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-report\fR \- Create, display, and submit reports\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-RESOURCE" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-RESOURCE" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-resource\fR \- The resource abstraction layer shell
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-SCRIPT" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-SCRIPT" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-script\fR \- Run a puppet manifests as a script without compiling a catalog
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET\-SSL" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-SSL" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-ssl\fR \- Manage SSL keys and certificates for puppet SSL clients
@@ -42,6 +42,10 @@ submit_request
42
42
  Generate a certificate signing request (CSR) and submit it to the CA\. If a private and public key pair already exist, they will be used to generate the CSR\. Otherwise a new key pair will be generated\. If a CSR has already been submitted with the given \fBcertname\fR, then the operation will fail\.
43
43
  .
44
44
  .TP
45
+ generate_request
46
+ Generate a certificate signing request (CSR)\. If a private and public key pair already exist, they will be used to generate the CSR\. Otherwise a new key pair will be generated\.
47
+ .
48
+ .TP
45
49
  download_cert
46
50
  Download a certificate for this host\. If the current private key matches the downloaded certificate, then the certificate will be saved and used for subsequent requests\. If there is already an existing certificate, it will be overwritten\.
47
51
  .
data/man/man8/puppet.8 CHANGED
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "PUPPET" "8" "August 2023" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET" "8" "October 2023" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\fR
@@ -25,4 +25,4 @@ Specialized:
25
25
  catalog Compile, save, view, and convert catalogs\. describe Display help about resource types device Manage remote network devices doc Generate Puppet references epp Interact directly with the EPP template parser/renderer\. facts Retrieve and store facts\. filebucket Store and retrieve files in a filebucket generate Generates Puppet code from Ruby definitions\. node View and manage node definitions\. parser Interact directly with the parser\. plugin Interact with the Puppet plugin system\. script Run a puppet manifests as a script without compiling a catalog ssl Manage SSL keys and certificates for puppet SSL clients
26
26
  .
27
27
  .P
28
- See \'puppet help \fIsubcommand\fR \fIaction\fR\' for help on a specific subcommand action\. See \'puppet help \fIsubcommand\fR\' for help on a specific subcommand\. Puppet v7\.26\.0
28
+ See \'puppet help \fIsubcommand\fR \fIaction\fR\' for help on a specific subcommand action\. See \'puppet help \fIsubcommand\fR\' for help on a specific subcommand\. Puppet v7\.27\.0
@@ -75,6 +75,19 @@ describe Puppet::Type.type(:exec), unless: Puppet::Util::Platform.jruby? do
75
75
  end
76
76
  end
77
77
 
78
+ context 'when an exec sends an EOF' do
79
+ let(:command) { ["/bin/bash", "-c", "exec /bin/sleep 1 >/dev/null 2>&1"] }
80
+
81
+ it 'should not take significant user time' do
82
+ exec = described_class.new :command => command, :path => ENV['PATH']
83
+ catalog.add_resource exec
84
+ timed_apply = Benchmark.measure { catalog.apply }
85
+ # In testing I found the user time before the patch in 4f35fd262e to be above
86
+ # 0.3, after the patch it was consistently below 0.1 seconds.
87
+ expect(timed_apply.utime).to be < 0.3
88
+ end
89
+ end
90
+
78
91
  context 'when command is a string' do
79
92
  let(:command) { "ruby -e 'File.open(\"#{path}\", \"w\") { |f| f.print \"foo\" }'" }
80
93
 
@@ -171,6 +171,50 @@ describe Puppet::Application::Ssl, unless: Puppet::Util::Platform.jruby? do
171
171
  end
172
172
  end
173
173
 
174
+ context 'when generating a CSR' do
175
+ let(:csr_path) { Puppet[:hostcsr] }
176
+ let(:requestdir) { Puppet[:requestdir] }
177
+
178
+ before do
179
+ ssl.command_line.args << 'generate_request'
180
+ end
181
+
182
+ it 'generates an RSA private key' do
183
+ File.unlink(Puppet[:hostprivkey])
184
+
185
+ expects_command_to_pass(%r{Generated certificate request in '#{csr_path}'})
186
+ end
187
+
188
+ it 'generates an EC private key' do
189
+ Puppet[:key_type] = 'ec'
190
+ File.unlink(Puppet[:hostprivkey])
191
+
192
+ expects_command_to_pass(%r{Generated certificate request in '#{csr_path}'})
193
+ end
194
+
195
+ it 'registers OIDs' do
196
+ expect(Puppet::SSL::Oids).to receive(:register_puppet_oids)
197
+
198
+ expects_command_to_pass(%r{Generated certificate request in '#{csr_path}'})
199
+ end
200
+
201
+ it 'saves the CSR locally' do
202
+ expects_command_to_pass(%r{Generated certificate request in '#{csr_path}'})
203
+
204
+ expect(Puppet::FileSystem).to be_exist(csr_path)
205
+ end
206
+
207
+ it 'accepts dns alt names' do
208
+ Puppet[:dns_alt_names] = 'majortom'
209
+
210
+ expects_command_to_pass
211
+
212
+ csr = Puppet::SSL::CertificateRequest.new(name)
213
+ csr.read(csr_path)
214
+ expect(csr.subject_alt_names).to include('DNS:majortom')
215
+ end
216
+ end
217
+
174
218
  context 'when downloading a certificate' do
175
219
  before do
176
220
  ssl.command_line.args << 'download_cert'
@@ -347,6 +391,11 @@ describe Puppet::Application::Ssl, unless: Puppet::Util::Platform.jruby? do
347
391
  expects_command_to_fail(%r{Failed to connect to the CA to determine if certificate #{name} has been cleaned})
348
392
  end
349
393
 
394
+ it 'raises if we have extra args' do
395
+ ssl.command_line.args << 'hostname.example.biz'
396
+ expects_command_to_fail(/Extra arguments detected: hostname.example.biz/)
397
+ end
398
+
350
399
  context 'when deleting local CA' do
351
400
  before do
352
401
  ssl.command_line.args << '--localca'
@@ -1,6 +1,7 @@
1
1
  require 'spec_helper'
2
2
  require 'puppet_spec/files'
3
3
  require 'puppet/file_system'
4
+ require 'puppet/util'
4
5
 
5
6
  describe Puppet::FileSystem::PathPattern do
6
7
  include PuppetSpec::Files
@@ -132,6 +133,20 @@ describe Puppet::FileSystem::PathPattern do
132
133
  File.join(dir, "found_two")])
133
134
  end
134
135
 
136
+ it 'globs wildcard patterns properly' do
137
+ # See PUP-11788 and https://github.com/jruby/jruby/issues/7836.
138
+ pending 'JRuby does not properly handle Dir.glob' if Puppet::Util::Platform.jruby?
139
+
140
+ dir = tmpdir('globtest')
141
+ create_file_in(dir, 'foo.pp')
142
+ create_file_in(dir, 'foo.pp.pp')
143
+
144
+ pattern = Puppet::FileSystem::PathPattern.absolute(File.join(dir, '**/*.pp'))
145
+
146
+ expect(pattern.glob).to match_array([File.join(dir, 'foo.pp'),
147
+ File.join(dir, 'foo.pp.pp')])
148
+ end
149
+
135
150
  def create_file_in(dir, name)
136
151
  File.open(File.join(dir, name), "w") { |f| f.puts "data" }
137
152
  end
@@ -50,4 +50,10 @@ describe 'the split function' do
50
50
  it 'should handle pattern in Regexp Type form with missing regular expression' do
51
51
  expect(split('ab',type_parser.parse('Regexp'))).to eql(['a', 'b'])
52
52
  end
53
+
54
+ it 'should handle sensitive String' do
55
+ expect(split(Puppet::Pops::Types::PSensitiveType::Sensitive.new('a,b'), ',')).to be_a(Puppet::Pops::Types::PSensitiveType::Sensitive)
56
+ expect(split(Puppet::Pops::Types::PSensitiveType::Sensitive.new('a,b'), /,/)).to be_a(Puppet::Pops::Types::PSensitiveType::Sensitive)
57
+ expect(split(Puppet::Pops::Types::PSensitiveType::Sensitive.new('a,b'), type_parser.parse('Regexp[/,/]'))).to be_a(Puppet::Pops::Types::PSensitiveType::Sensitive)
58
+ end
53
59
  end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ describe Puppet::SSL::CertificateSigner do
4
+ include PuppetSpec::Files
5
+
6
+ let(:wrong_key) { OpenSSL::PKey::RSA.new(512) }
7
+ let(:client_cert) { cert_fixture('signed.pem') }
8
+
9
+ # jruby-openssl >= 0.13.0 (JRuby >= 9.3.5.0) raises an error when signing a
10
+ # certificate when there is a discrepancy between the certificate and key.
11
+ it 'raises if client cert signature is invalid', if: Puppet::Util::Platform.jruby? && RUBY_VERSION.to_f >= 2.6 do
12
+ expect {
13
+ client_cert.sign(wrong_key, OpenSSL::Digest::SHA256.new)
14
+ }.to raise_error(OpenSSL::X509::CertificateError,
15
+ 'invalid public key data')
16
+ end
17
+ end
@@ -298,7 +298,7 @@ describe Puppet::SSL::SSLProvider do
298
298
  ).to eq(['CN=signed', 'CN=Test CA Subauthority', 'CN=Test CA'])
299
299
  end
300
300
 
301
- it 'raises if client cert signature is invalid' do
301
+ it 'raises if client cert signature is invalid', unless: Puppet::Util::Platform.jruby? && RUBY_VERSION.to_f >= 2.6 do
302
302
  client_cert.sign(wrong_key, OpenSSL::Digest::SHA256.new)
303
303
  expect {
304
304
  subject.create_context(**config.merge(client_cert: client_cert))
@@ -337,7 +337,7 @@ describe Puppet::SSL::SSLProvider do
337
337
  end
338
338
  end
339
339
 
340
- it 'raises if intermediate CA signature is invalid' do
340
+ it 'raises if intermediate CA signature is invalid', unless: Puppet::Util::Platform.jruby? && RUBY_VERSION.to_f >= 2.6 do
341
341
  int = global_cacerts.last
342
342
  int.sign(wrong_key, OpenSSL::Digest::SHA256.new)
343
343
 
@@ -29,6 +29,7 @@ describe Puppet::Util::Execution, if: !Puppet::Util::Platform.jruby? do
29
29
  allow(FFI::WIN32).to receive(:CloseHandle).with(thread_handle)
30
30
  else
31
31
  allow(Process).to receive(:waitpid2).with(pid, Process::WNOHANG).and_return(nil, [pid, double('child_status', :exitstatus => exitstatus)])
32
+ allow(Process).to receive(:waitpid2).with(pid, 0).and_return(nil, [pid, double('child_status', :exitstatus => exitstatus)])
32
33
  allow(Process).to receive(:waitpid2).with(pid).and_return([pid, double('child_status', :exitstatus => exitstatus)])
33
34
  end
34
35
  end
@@ -95,6 +95,31 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet::Util::Platform.windows? do
95
95
  end
96
96
  end
97
97
 
98
+ describe '.get_sids' do
99
+ it 'returns an array of SIDs given two an array of ADSI children' do
100
+ child1 = double('child1', name: 'Administrator', sid: 'S-1-5-21-3882680660-671291151-3888264257-500')
101
+ child2 = double('child2', name: 'Guest', sid: 'S-1-5-21-3882680660-671291151-3888264257-501')
102
+ allow(Puppet::Util::Windows::SID).to receive(:ads_to_principal).with(child1).and_return('Administrator')
103
+ allow(Puppet::Util::Windows::SID).to receive(:ads_to_principal).with(child2).and_return('Guest')
104
+ sids = Puppet::Util::Windows::ADSI::ADSIObject.get_sids([child1, child2])
105
+ expect(sids).to eq(['Administrator', 'Guest'])
106
+ end
107
+
108
+ it 'returns an array of SIDs given an ADSI child and ads_to_principal returning domain failure' do
109
+ child = double('child1', name: 'Administrator', sid: 'S-1-5-21-3882680660-671291151-3888264257-500')
110
+ allow(Puppet::Util::Windows::SID).to receive(:ads_to_principal).with(child).and_raise(Puppet::Util::Windows::Error.new('', Puppet::Util::Windows::SID::ERROR_TRUSTED_DOMAIN_FAILURE))
111
+ sids = Puppet::Util::Windows::ADSI::ADSIObject.get_sids([child])
112
+ expect(sids[0]).to eq(Puppet::Util::Windows::SID::Principal.new(child.name, child.sid, child.name, nil, :SidTypeUnknown))
113
+ end
114
+
115
+ it 'returns an array of SIDs given an ADSI child and ads_to_principal returning relationship failure' do
116
+ child = double('child1', name: 'Administrator', sid: 'S-1-5-21-3882680660-671291151-3888264257-500')
117
+ allow(Puppet::Util::Windows::SID).to receive(:ads_to_principal).with(child).and_raise(Puppet::Util::Windows::Error.new('', Puppet::Util::Windows::SID::ERROR_TRUSTED_RELATIONSHIP_FAILURE))
118
+ sids = Puppet::Util::Windows::ADSI::ADSIObject.get_sids([child])
119
+ expect(sids[0]).to eq(Puppet::Util::Windows::SID::Principal.new(child.name, child.sid, child.name, nil, :SidTypeUnknown))
120
+ end
121
+ end
122
+
98
123
  describe Puppet::Util::Windows::ADSI::User do
99
124
  let(:username) { 'testuser' }
100
125
  let(:domain) { 'DOMAIN' }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.26.0
4
+ version: 7.27.0
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-21 00:00:00.000000000 Z
11
+ date: 2023-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter
@@ -172,22 +172,16 @@ dependencies:
172
172
  name: ffi
173
173
  requirement: !ruby/object:Gem::Requirement
174
174
  requirements:
175
- - - ">"
176
- - !ruby/object:Gem::Version
177
- version: 1.9.24
178
- - - "<"
175
+ - - '='
179
176
  - !ruby/object:Gem::Version
180
- version: '2'
177
+ version: 1.15.5
181
178
  type: :runtime
182
179
  prerelease: false
183
180
  version_requirements: !ruby/object:Gem::Requirement
184
181
  requirements:
185
- - - ">"
186
- - !ruby/object:Gem::Version
187
- version: 1.9.24
188
- - - "<"
182
+ - - '='
189
183
  - !ruby/object:Gem::Version
190
- version: '2'
184
+ version: 1.15.5
191
185
  - !ruby/object:Gem::Dependency
192
186
  name: minitar
193
187
  requirement: !ruby/object:Gem::Requirement
@@ -2413,6 +2407,7 @@ files:
2413
2407
  - spec/unit/ssl/base_spec.rb
2414
2408
  - spec/unit/ssl/certificate_request_attributes_spec.rb
2415
2409
  - spec/unit/ssl/certificate_request_spec.rb
2410
+ - spec/unit/ssl/certificate_signer_spec.rb
2416
2411
  - spec/unit/ssl/certificate_spec.rb
2417
2412
  - spec/unit/ssl/digest_spec.rb
2418
2413
  - spec/unit/ssl/oids_spec.rb
@@ -2575,7 +2570,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2575
2570
  - !ruby/object:Gem::Version
2576
2571
  version: 1.3.1
2577
2572
  requirements: []
2578
- rubygems_version: 3.4.12
2573
+ rubygems_version: 3.4.20
2579
2574
  signing_key:
2580
2575
  specification_version: 4
2581
2576
  summary: Puppet, an automated configuration management tool
@@ -3676,6 +3671,7 @@ test_files:
3676
3671
  - spec/unit/ssl/base_spec.rb
3677
3672
  - spec/unit/ssl/certificate_request_attributes_spec.rb
3678
3673
  - spec/unit/ssl/certificate_request_spec.rb
3674
+ - spec/unit/ssl/certificate_signer_spec.rb
3679
3675
  - spec/unit/ssl/certificate_spec.rb
3680
3676
  - spec/unit/ssl/digest_spec.rb
3681
3677
  - spec/unit/ssl/oids_spec.rb