chef 18.5.0 → 18.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +11 -6
  3. data/chef-universal-mingw-ucrt.gemspec +1 -1
  4. data/chef.gemspec +19 -15
  5. data/lib/chef/application/client.rb +0 -12
  6. data/lib/chef/client.rb +1 -10
  7. data/lib/chef/compliance/default_attributes.rb +2 -2
  8. data/lib/chef/compliance/runner.rb +6 -11
  9. data/lib/chef/cookbook/metadata.rb +1 -1
  10. data/lib/chef/cookbook/remote_file_vendor.rb +1 -3
  11. data/lib/chef/cookbook/synchronizer.rb +0 -5
  12. data/lib/chef/event_dispatch/dispatcher.rb +0 -1
  13. data/lib/chef/exceptions.rb +1 -1
  14. data/lib/chef/file_access_control/unix.rb +9 -9
  15. data/lib/chef/file_content_management/deploy.rb +1 -4
  16. data/lib/chef/mixin/file_class.rb +1 -3
  17. data/lib/chef/mixin/get_source_from_package.rb +1 -1
  18. data/lib/chef/mixin/{homebrew_user.rb → homebrew.rb} +13 -16
  19. data/lib/chef/mixin/openssl_helper.rb +1 -12
  20. data/lib/chef/provider/cookbook_file.rb +1 -1
  21. data/lib/chef/provider/cron.rb +1 -1
  22. data/lib/chef/provider/directory.rb +15 -15
  23. data/lib/chef/provider/file.rb +29 -42
  24. data/lib/chef/provider/git.rb +8 -8
  25. data/lib/chef/provider/group/aix.rb +1 -1
  26. data/lib/chef/provider/group/dscl.rb +1 -1
  27. data/lib/chef/provider/group/gpasswd.rb +2 -2
  28. data/lib/chef/provider/group/groupadd.rb +1 -1
  29. data/lib/chef/provider/group/groupmod.rb +2 -2
  30. data/lib/chef/provider/group/pw.rb +2 -2
  31. data/lib/chef/provider/group/solaris.rb +2 -2
  32. data/lib/chef/provider/group/usermod.rb +2 -2
  33. data/lib/chef/provider/group.rb +1 -1
  34. data/lib/chef/provider/http_request.rb +3 -2
  35. data/lib/chef/provider/ifconfig/aix.rb +1 -1
  36. data/lib/chef/provider/ifconfig/debian.rb +3 -3
  37. data/lib/chef/provider/ifconfig/redhat.rb +1 -1
  38. data/lib/chef/provider/ifconfig.rb +1 -1
  39. data/lib/chef/provider/link.rb +10 -10
  40. data/lib/chef/provider/mount/aix.rb +4 -4
  41. data/lib/chef/provider/mount/linux.rb +4 -4
  42. data/lib/chef/provider/mount/mount.rb +11 -11
  43. data/lib/chef/provider/package/apt.rb +11 -2
  44. data/lib/chef/provider/package/bff.rb +3 -3
  45. data/lib/chef/provider/package/chocolatey.rb +2 -2
  46. data/lib/chef/provider/package/dnf/dnf_helper.py +7 -0
  47. data/lib/chef/provider/package/dpkg.rb +3 -3
  48. data/lib/chef/provider/package/freebsd/base.rb +1 -1
  49. data/lib/chef/provider/package/habitat.rb +3 -5
  50. data/lib/chef/provider/package/homebrew.rb +6 -9
  51. data/lib/chef/provider/package/ips.rb +2 -2
  52. data/lib/chef/provider/package/openbsd.rb +2 -3
  53. data/lib/chef/provider/package/pacman.rb +4 -4
  54. data/lib/chef/provider/package/paludis.rb +2 -2
  55. data/lib/chef/provider/package/portage.rb +1 -1
  56. data/lib/chef/provider/package/rpm.rb +2 -2
  57. data/lib/chef/provider/package/rubygems.rb +4 -0
  58. data/lib/chef/provider/package/smartos.rb +2 -2
  59. data/lib/chef/provider/package/snap.rb +2 -2
  60. data/lib/chef/provider/package/solaris.rb +4 -4
  61. data/lib/chef/provider/package/zypper.rb +4 -4
  62. data/lib/chef/provider/package.rb +1 -1
  63. data/lib/chef/provider/registry_key.rb +6 -0
  64. data/lib/chef/provider/remote_directory.rb +5 -5
  65. data/lib/chef/provider/remote_file/http.rb +3 -2
  66. data/lib/chef/provider/remote_file.rb +1 -1
  67. data/lib/chef/provider/route.rb +9 -9
  68. data/lib/chef/provider/service/aix.rb +1 -1
  69. data/lib/chef/provider/service/aixinit.rb +4 -4
  70. data/lib/chef/provider/service/arch.rb +6 -6
  71. data/lib/chef/provider/service/debian.rb +5 -5
  72. data/lib/chef/provider/service/freebsd.rb +7 -7
  73. data/lib/chef/provider/service/gentoo.rb +5 -5
  74. data/lib/chef/provider/service/init.rb +2 -2
  75. data/lib/chef/provider/service/insserv.rb +2 -2
  76. data/lib/chef/provider/service/invokercd.rb +1 -1
  77. data/lib/chef/provider/service/openbsd.rb +7 -7
  78. data/lib/chef/provider/service/redhat.rb +3 -3
  79. data/lib/chef/provider/service/solaris.rb +2 -2
  80. data/lib/chef/provider/service/systemd.rb +2 -2
  81. data/lib/chef/provider/service/upstart.rb +2 -2
  82. data/lib/chef/provider/subversion.rb +8 -8
  83. data/lib/chef/provider/systemd_unit.rb +3 -3
  84. data/lib/chef/provider/template.rb +1 -1
  85. data/lib/chef/provider/user/aix.rb +3 -3
  86. data/lib/chef/provider/user/linux.rb +2 -7
  87. data/lib/chef/provider/user/pw.rb +3 -3
  88. data/lib/chef/provider/user/solaris.rb +7 -7
  89. data/lib/chef/provider/user/windows.rb +5 -0
  90. data/lib/chef/provider/user.rb +8 -7
  91. data/lib/chef/provider/yum_repository.rb +3 -1
  92. data/lib/chef/provider/zypper_repository.rb +1 -1
  93. data/lib/chef/providers.rb +0 -1
  94. data/lib/chef/resource/alternatives.rb +2 -2
  95. data/lib/chef/resource/apt_preference.rb +1 -1
  96. data/lib/chef/resource/apt_repository.rb +90 -15
  97. data/lib/chef/resource/apt_update.rb +3 -3
  98. data/lib/chef/resource/bff_package.rb +1 -1
  99. data/lib/chef/resource/chef_client_config.rb +3 -2
  100. data/lib/chef/resource/chef_sleep.rb +1 -1
  101. data/lib/chef/resource/cookbook_file.rb +1 -1
  102. data/lib/chef/resource/cron/cron.rb +1 -1
  103. data/lib/chef/resource/cron/cron_d.rb +1 -1
  104. data/lib/chef/resource/cron_access.rb +1 -1
  105. data/lib/chef/resource/directory.rb +1 -1
  106. data/lib/chef/resource/dpkg_package.rb +1 -1
  107. data/lib/chef/resource/file/verification/json.rb +1 -1
  108. data/lib/chef/resource/file/verification/systemd_unit.rb +1 -1
  109. data/lib/chef/resource/file/verification/yaml.rb +1 -1
  110. data/lib/chef/resource/file.rb +1 -1
  111. data/lib/chef/resource/freebsd_package.rb +2 -2
  112. data/lib/chef/resource/group.rb +1 -1
  113. data/lib/chef/resource/habitat/habitat_package.rb +1 -1
  114. data/lib/chef/resource/habitat/habitat_sup.rb +9 -9
  115. data/lib/chef/resource/habitat/habitat_sup_systemd.rb +2 -2
  116. data/lib/chef/resource/habitat_install.rb +3 -3
  117. data/lib/chef/resource/homebrew_cask.rb +19 -30
  118. data/lib/chef/resource/homebrew_tap.rb +32 -17
  119. data/lib/chef/resource/homebrew_update.rb +4 -4
  120. data/lib/chef/resource/hostname.rb +10 -11
  121. data/lib/chef/resource/http_request.rb +1 -1
  122. data/lib/chef/resource/ifconfig.rb +1 -1
  123. data/lib/chef/resource/inspec_input.rb +1 -3
  124. data/lib/chef/resource/inspec_waiver.rb +1 -1
  125. data/lib/chef/resource/inspec_waiver_file_entry.rb +1 -1
  126. data/lib/chef/resource/ips_package.rb +2 -2
  127. data/lib/chef/resource/kernel_module.rb +2 -2
  128. data/lib/chef/resource/link.rb +1 -1
  129. data/lib/chef/resource/locale.rb +2 -2
  130. data/lib/chef/resource/mount.rb +1 -1
  131. data/lib/chef/resource/notify_group.rb +1 -1
  132. data/lib/chef/resource/ohai.rb +1 -1
  133. data/lib/chef/resource/ohai_hint.rb +1 -1
  134. data/lib/chef/resource/openbsd_package.rb +2 -2
  135. data/lib/chef/resource/package.rb +1 -1
  136. data/lib/chef/resource/pacman_package.rb +1 -1
  137. data/lib/chef/resource/paludis_package.rb +1 -1
  138. data/lib/chef/resource/portage_package.rb +1 -1
  139. data/lib/chef/resource/reboot.rb +1 -1
  140. data/lib/chef/resource/registry_key.rb +18 -0
  141. data/lib/chef/resource/remote_directory.rb +1 -1
  142. data/lib/chef/resource/remote_file.rb +1 -1
  143. data/lib/chef/resource/rhsm_errata.rb +1 -1
  144. data/lib/chef/resource/rhsm_errata_level.rb +1 -1
  145. data/lib/chef/resource/rhsm_register.rb +1 -1
  146. data/lib/chef/resource/rhsm_repo.rb +4 -3
  147. data/lib/chef/resource/rhsm_subscription.rb +9 -8
  148. data/lib/chef/resource/route.rb +1 -1
  149. data/lib/chef/resource/rpm_package.rb +1 -1
  150. data/lib/chef/resource/scm/git.rb +1 -1
  151. data/lib/chef/resource/scm/subversion.rb +1 -1
  152. data/lib/chef/resource/selinux/common_helpers.rb +1 -1
  153. data/lib/chef/resource/selinux_boolean.rb +1 -1
  154. data/lib/chef/resource/selinux_fcontext.rb +3 -3
  155. data/lib/chef/resource/selinux_install.rb +1 -1
  156. data/lib/chef/resource/selinux_login.rb +1 -1
  157. data/lib/chef/resource/selinux_module.rb +5 -5
  158. data/lib/chef/resource/selinux_permissive.rb +2 -2
  159. data/lib/chef/resource/selinux_port.rb +2 -2
  160. data/lib/chef/resource/selinux_state.rb +2 -2
  161. data/lib/chef/resource/selinux_user.rb +1 -1
  162. data/lib/chef/resource/smartos_package.rb +2 -2
  163. data/lib/chef/resource/snap_package.rb +1 -1
  164. data/lib/chef/resource/solaris_package.rb +1 -1
  165. data/lib/chef/resource/ssh_known_hosts_entry.rb +1 -1
  166. data/lib/chef/resource/sudo.rb +5 -5
  167. data/lib/chef/resource/support/client.erb +3 -2
  168. data/lib/chef/resource/swap_file.rb +6 -6
  169. data/lib/chef/resource/sysctl.rb +5 -5
  170. data/lib/chef/resource/systemd_unit.rb +1 -1
  171. data/lib/chef/resource/template.rb +1 -1
  172. data/lib/chef/resource/timezone.rb +5 -5
  173. data/lib/chef/resource/user/aix_user.rb +2 -2
  174. data/lib/chef/resource/user/linux_user.rb +2 -2
  175. data/lib/chef/resource/user/pw_user.rb +2 -2
  176. data/lib/chef/resource/user/solaris_user.rb +2 -2
  177. data/lib/chef/resource/user_ulimit.rb +1 -1
  178. data/lib/chef/resource/yum_repository.rb +1 -1
  179. data/lib/chef/resource/zypper_package.rb +2 -2
  180. data/lib/chef/resource/zypper_repository.rb +2 -2
  181. data/lib/chef/resource.rb +1 -0
  182. data/lib/chef/resource_inspector.rb +25 -7
  183. data/lib/chef/resource_reporter.rb +1 -0
  184. data/lib/chef/run_lock.rb +0 -3
  185. data/lib/chef/scan_access_control.rb +6 -6
  186. data/lib/chef/util/backup.rb +1 -1
  187. data/lib/chef/util/diff.rb +1 -14
  188. data/lib/chef/util/file_edit.rb +4 -4
  189. data/lib/chef/util/powershell/ps_credential.rb +10 -0
  190. data/lib/chef/version.rb +1 -1
  191. data/lib/chef/win32/registry.rb +5 -1
  192. data/lib/chef/win32/security.rb +9 -0
  193. data/lib/chef.rb +0 -2
  194. data/spec/functional/assets/yumrepo-empty/repodata/repomd.xml +6 -6
  195. data/spec/functional/resource/cookbook_file_spec.rb +1 -1
  196. data/spec/functional/resource/registry_spec.rb +276 -609
  197. data/spec/integration/client/open_ssl_spec.rb +1 -1
  198. data/spec/spec_helper.rb +1 -0
  199. data/spec/support/chef_helpers.rb +2 -2
  200. data/spec/support/platform_helpers.rb +8 -0
  201. data/spec/support/shared/functional/file_resource.rb +3 -3
  202. data/spec/tiny_server.rb +5 -2
  203. data/spec/unit/mixin/homebrew_spec.rb +118 -0
  204. data/spec/unit/provider/apt_repository_spec.rb +14 -9
  205. data/spec/unit/provider/package/chocolatey_spec.rb +1 -1
  206. data/spec/unit/provider/package/homebrew_spec.rb +4 -1
  207. data/spec/unit/provider/registry_key_spec.rb +18 -17
  208. data/spec/unit/provider/route_spec.rb +4 -6
  209. data/spec/unit/provider/user/windows_spec.rb +1 -0
  210. data/spec/unit/resource/rhsm_repo_spec.rb +0 -1
  211. data/spec/unit/resource/rhsm_subscription_spec.rb +0 -2
  212. data/spec/unit/resource_inspector_spec.rb +36 -0
  213. data/spec/unit/util/powershell/ps_credential_spec.rb +6 -0
  214. metadata +36 -44
  215. data/lib/chef/file_content_management/deploy/target_io.rb +0 -29
  216. data/lib/chef/provider/.gitkeep +0 -0
  217. data/lib/chef/provider/package/snap_tm.rb +0 -79
  218. data/lib/chef/resource/.gitkeep +0 -0
  219. data/lib/chef/target_io/dir.rb +0 -12
  220. data/lib/chef/target_io/etc.rb +0 -16
  221. data/lib/chef/target_io/file.rb +0 -12
  222. data/lib/chef/target_io/fileutils.rb +0 -12
  223. data/lib/chef/target_io/http.rb +0 -22
  224. data/lib/chef/target_io/io.rb +0 -12
  225. data/lib/chef/target_io/shadow.rb +0 -44
  226. data/lib/chef/target_io/train/dir.rb +0 -69
  227. data/lib/chef/target_io/train/etc.rb +0 -112
  228. data/lib/chef/target_io/train/file.rb +0 -219
  229. data/lib/chef/target_io/train/fileutils.rb +0 -220
  230. data/lib/chef/target_io/train/http.rb +0 -117
  231. data/lib/chef/target_io/train/io.rb +0 -13
  232. data/lib/chef/target_io/train/shadow.rb +0 -52
  233. data/lib/chef/target_io/train_compat.rb +0 -7
  234. data/lib/chef/target_io.rb +0 -9
  235. data/spec/unit/mixin/homebrew_user_spec.rb +0 -119
  236. /data/spec/functional/assets/yumrepo-empty/repodata/{01a3b489a465bcac22a43492163df43451dc6ce47d27f66de289756b91635523-filelists.sqlite.bz2 → 01a3b-filelists.sqlite.bz2} +0 -0
  237. /data/spec/functional/assets/yumrepo-empty/repodata/{401dc19bda88c82c403423fb835844d64345f7e95f5b9835888189c03834cc93-filelists.xml.gz → 401dc-filelists.xml.gz} +0 -0
  238. /data/spec/functional/assets/yumrepo-empty/repodata/{5dc1e6e73c84803f059bb3065e684e56adfc289a7e398946574d79dac6643945-primary.sqlite.bz2 → 5dc1e-primary.sqlite.bz2} +0 -0
  239. /data/spec/functional/assets/yumrepo-empty/repodata/{6bf9672d0862e8ef8b8ff05a2fd0208a922b1f5978e6589d87944c88259cb670-other.xml.gz → 6bf96-other.xml.gz} +0 -0
  240. /data/spec/functional/assets/yumrepo-empty/repodata/{7c36572015e075add2b38b900837bcdbb8a504130ddff49b2351a7fc0affa3d4-other.sqlite.bz2 → 7c365-other.sqlite.bz2} +0 -0
  241. /data/spec/functional/assets/yumrepo-empty/repodata/{dabe2ce5481d23de1f4f52bdcfee0f9af98316c9e0de2ce8123adeefa0dd08b9-primary.xml.gz → dabe2-primary.xml.gz} +0 -0
data/lib/chef/run_lock.rb CHANGED
@@ -151,9 +151,6 @@ class Chef
151
151
  # will return false
152
152
  if runlock.flock(File::LOCK_NB | File::LOCK_EX) == 0
153
153
  true
154
- # Target mode does not have run locks, because concurrency is intended
155
- elsif Chef::Config.target_mode?
156
- true
157
154
  else
158
155
  false
159
156
  end
@@ -46,7 +46,7 @@ class Chef
46
46
 
47
47
  # Modifies @current_resource, setting the current access control state.
48
48
  def set_all!
49
- if ::TargetIO::File.exist?(new_resource.path)
49
+ if ::File.exist?(new_resource.path)
50
50
  set_owner
51
51
  set_group
52
52
  set_mode
@@ -76,7 +76,7 @@ class Chef
76
76
  end
77
77
 
78
78
  def lookup_uid
79
- unless (pwent = TargetIO::Etc.getpwuid(stat.uid)).nil?
79
+ unless (pwent = Etc.getpwuid(stat.uid)).nil?
80
80
  pwent.name
81
81
  else
82
82
  stat.uid
@@ -103,7 +103,7 @@ class Chef
103
103
  end
104
104
 
105
105
  def lookup_gid
106
- unless (pwent = TargetIO::Etc.getgrgid(stat.gid)).nil?
106
+ unless (pwent = Etc.getgrgid(stat.gid)).nil?
107
107
  pwent.name
108
108
  else
109
109
  stat.gid
@@ -128,10 +128,10 @@ class Chef
128
128
 
129
129
  def stat
130
130
  @stat ||= if @new_resource.instance_of?(Chef::Resource::Link)
131
- ::TargetIO::File.lstat(@new_resource.path)
131
+ ::File.lstat(@new_resource.path)
132
132
  else
133
- realpath = ::TargetIO::File.realpath(@new_resource.path)
134
- ::TargetIO::File.stat(realpath)
133
+ realpath = ::File.realpath(@new_resource.path)
134
+ ::File.stat(realpath)
135
135
  end
136
136
  end
137
137
  end
@@ -30,7 +30,7 @@ class Chef
30
30
  end
31
31
 
32
32
  def backup!
33
- if @new_resource.backup != false && @new_resource.backup > 0 && ::TargetIO::File.exist?(path)
33
+ if @new_resource.backup != false && @new_resource.backup > 0 && ::File.exist?(path)
34
34
  do_backup
35
35
  # Clean up after the number of backups
36
36
  slice_number = @new_resource.backup
@@ -60,7 +60,7 @@ class Chef
60
60
 
61
61
  def use_tempfile_if_missing(file)
62
62
  tempfile = nil
63
- unless TargetIO::File.exist?(file)
63
+ unless File.exist?(file)
64
64
  Chef::Log.trace("File #{file} does not exist to diff against, using empty tempfile")
65
65
  tempfile = Tempfile.new("chef-diff")
66
66
  file = tempfile.path
@@ -131,19 +131,6 @@ class Chef
131
131
  diff_filesize_threshold = Chef::Config[:diff_filesize_threshold]
132
132
  diff_output_threshold = Chef::Config[:diff_output_threshold]
133
133
 
134
- # Download files for diffs in Target Mode, then work locally
135
- if ChefConfig::Config.target_mode?
136
- connection = Chef.run_context&.transport_connection
137
-
138
- old_copy = Tempfile.new(old_file)
139
- connection.download(old_file, old_copy.path) if connection.file(old_file).exist?
140
- old_file = old_copy.path
141
-
142
- new_copy = Tempfile.new(new_file)
143
- connection.download(new_file, new_copy.path) if connection.file(new_file).exist?
144
- new_file = new_copy.path
145
- end
146
-
147
134
  if ::File.size(old_file) > diff_filesize_threshold || ::File.size(new_file) > diff_filesize_threshold
148
135
  return "(file sizes exceed #{diff_filesize_threshold} bytes, diff output suppressed)"
149
136
  end
@@ -29,9 +29,9 @@ class Chef
29
29
  public
30
30
 
31
31
  def initialize(filepath)
32
- raise ArgumentError, "File '#{filepath}' does not exist" unless TargetIO::File.exist?(filepath)
32
+ raise ArgumentError, "File '#{filepath}' does not exist" unless File.exist?(filepath)
33
33
 
34
- @editor = Editor.new(TargetIO::File.open(filepath, &:readlines))
34
+ @editor = Editor.new(File.open(filepath, &:readlines))
35
35
  @original_pathname = filepath
36
36
  @file_edited = false
37
37
  end
@@ -85,8 +85,8 @@ class Chef
85
85
  def write_file
86
86
  if @changes
87
87
  backup_pathname = original_pathname + ".old"
88
- TargetIO::FileUtils.cp(original_pathname, backup_pathname, preserve: true)
89
- TargetIO::File.open(original_pathname, "w") do |newfile|
88
+ FileUtils.cp(original_pathname, backup_pathname, preserve: true)
89
+ File.open(original_pathname, "w") do |newfile|
90
90
  editor.lines.each do |line|
91
91
  newfile.puts(line)
92
92
  end
@@ -31,9 +31,19 @@ class Chef
31
31
  "New-Object System.Management.Automation.PSCredential('#{@username}',('#{encrypt(@password)}' | ConvertTo-SecureString))"
32
32
  end
33
33
 
34
+ def to_plaintext
35
+ "#<Chef::Util::Powershell::PSCredential:#{object_id} @username=#{@username.inspect}>"
36
+ end
37
+
38
+ # These leak an encrypted password, however we can't rely on no-one using
39
+ # these assuming that behavior.
34
40
  alias to_s to_psobject
35
41
  alias to_text to_psobject
36
42
 
43
+ # Inspect has no business leaking anything but the username, and to be honest
44
+ # even that one could be dicey
45
+ alias inspect to_plaintext
46
+
37
47
  private
38
48
 
39
49
  def encrypt(str)
data/lib/chef/version.rb CHANGED
@@ -23,7 +23,7 @@ require_relative "version_string"
23
23
 
24
24
  class Chef
25
25
  CHEF_ROOT = File.expand_path("..", __dir__)
26
- VERSION = Chef::VersionString.new("18.5.0")
26
+ VERSION = Chef::VersionString.new("18.7.3")
27
27
  end
28
28
 
29
29
  #
@@ -26,6 +26,11 @@ if RUBY_PLATFORM.match?(/mswin|mingw|windows/)
26
26
  autoload :Registry, File.expand_path("../monkey_patches/win32/registry", __dir__)
27
27
  end
28
28
  require_relative "api/registry"
29
+
30
+ require "win32/resolv"
31
+ ::Win32::Registry.define_method :export_string do |str, enc = (Encoding.default_internal || "utf-8")|
32
+ str.encode(enc)
33
+ end
29
34
  end
30
35
 
31
36
  class Chef
@@ -377,7 +382,6 @@ class Chef
377
382
  hive_name = reg_path.shift
378
383
  key = reg_path.join("\\")
379
384
  end
380
-
381
385
  end
382
386
  end
383
387
  end
@@ -130,6 +130,15 @@ class Chef
130
130
  end
131
131
  end
132
132
 
133
+ def self.clear_account_rights(name)
134
+ return if get_account_right(name) == []
135
+
136
+ with_lsa_policy(name) do |policy_handle, sid|
137
+ result = LsaRemoveAccountRights(policy_handle.read_pointer, sid, true, nil, 1)
138
+ test_and_raise_lsa_nt_status(result)
139
+ end
140
+ end
141
+
133
142
  def self.adjust_token_privileges(token, privileges)
134
143
  token = token.handle if token.respond_to?(:handle)
135
144
  old_privileges_size = FFI::Buffer.new(:long).write_long(privileges.size_with_privileges)
data/lib/chef.rb CHANGED
@@ -32,5 +32,3 @@ require_relative "chef/handler"
32
32
  require_relative "chef/handler/json_file"
33
33
  require_relative "chef/event_dispatch/dsl"
34
34
  require_relative "chef/chef_class"
35
-
36
- require_relative "chef/target_io"
@@ -4,7 +4,7 @@
4
4
  <data type="filelists">
5
5
  <checksum type="sha256">401dc19bda88c82c403423fb835844d64345f7e95f5b9835888189c03834cc93</checksum>
6
6
  <open-checksum type="sha256">bf9808b81cb2dbc54b4b8e35adc584ddcaa73bd81f7088d73bf7dbbada961310</open-checksum>
7
- <location href="repodata/401dc19bda88c82c403423fb835844d64345f7e95f5b9835888189c03834cc93-filelists.xml.gz"/>
7
+ <location href="repodata/401dc-filelists.xml.gz"/>
8
8
  <timestamp>1667508211</timestamp>
9
9
  <size>123</size>
10
10
  <open-size>125</open-size>
@@ -12,7 +12,7 @@
12
12
  <data type="primary">
13
13
  <checksum type="sha256">dabe2ce5481d23de1f4f52bdcfee0f9af98316c9e0de2ce8123adeefa0dd08b9</checksum>
14
14
  <open-checksum type="sha256">e1e2ffd2fb1ee76f87b70750d00ca5677a252b397ab6c2389137a0c33e7b359f</open-checksum>
15
- <location href="repodata/dabe2ce5481d23de1f4f52bdcfee0f9af98316c9e0de2ce8123adeefa0dd08b9-primary.xml.gz"/>
15
+ <location href="repodata/dabe2-primary.xml.gz"/>
16
16
  <timestamp>1667508211</timestamp>
17
17
  <size>134</size>
18
18
  <open-size>167</open-size>
@@ -20,7 +20,7 @@
20
20
  <data type="primary_db">
21
21
  <checksum type="sha256">5dc1e6e73c84803f059bb3065e684e56adfc289a7e398946574d79dac6643945</checksum>
22
22
  <open-checksum type="sha256">f0d550414e8f2e960e82e704549364299ca9e3e8664ad4faffd208262c3b6d12</open-checksum>
23
- <location href="repodata/5dc1e6e73c84803f059bb3065e684e56adfc289a7e398946574d79dac6643945-primary.sqlite.bz2"/>
23
+ <location href="repodata/5dc1e-primary.sqlite.bz2"/>
24
24
  <timestamp>1667508211</timestamp>
25
25
  <database_version>10</database_version>
26
26
  <size>1131</size>
@@ -29,7 +29,7 @@
29
29
  <data type="other_db">
30
30
  <checksum type="sha256">7c36572015e075add2b38b900837bcdbb8a504130ddff49b2351a7fc0affa3d4</checksum>
31
31
  <open-checksum type="sha256">4de0fe7c5dd2674849a7c63c326e42f33af0a0f46219bc6dd59f51dfa2ac8c68</open-checksum>
32
- <location href="repodata/7c36572015e075add2b38b900837bcdbb8a504130ddff49b2351a7fc0affa3d4-other.sqlite.bz2"/>
32
+ <location href="repodata/7c365-other.sqlite.bz2"/>
33
33
  <timestamp>1667508211</timestamp>
34
34
  <database_version>10</database_version>
35
35
  <size>575</size>
@@ -38,7 +38,7 @@
38
38
  <data type="other">
39
39
  <checksum type="sha256">6bf9672d0862e8ef8b8ff05a2fd0208a922b1f5978e6589d87944c88259cb670</checksum>
40
40
  <open-checksum type="sha256">e0ed5e0054194df036cf09c1a911e15bf2a4e7f26f2a788b6f47d53e80717ccc</open-checksum>
41
- <location href="repodata/6bf9672d0862e8ef8b8ff05a2fd0208a922b1f5978e6589d87944c88259cb670-other.xml.gz"/>
41
+ <location href="repodata/6bf96-other.xml.gz"/>
42
42
  <timestamp>1667508211</timestamp>
43
43
  <size>123</size>
44
44
  <open-size>121</open-size>
@@ -46,7 +46,7 @@
46
46
  <data type="filelists_db">
47
47
  <checksum type="sha256">01a3b489a465bcac22a43492163df43451dc6ce47d27f66de289756b91635523</checksum>
48
48
  <open-checksum type="sha256">c4211f57bdcbb142c9f93a6d32401539f775eb6a670ab7a423e13f435ce94689</open-checksum>
49
- <location href="repodata/01a3b489a465bcac22a43492163df43451dc6ce47d27f66de289756b91635523-filelists.sqlite.bz2"/>
49
+ <location href="repodata/01a3b-filelists.sqlite.bz2"/>
50
50
  <timestamp>1667508211</timestamp>
51
51
  <database_version>10</database_version>
52
52
  <size>586</size>
@@ -57,7 +57,7 @@ describe Chef::Resource::CookbookFile do
57
57
  create_resource
58
58
  end
59
59
 
60
- it_behaves_like "a file resource"
60
+ it_behaves_like "a file resource", :not_supported_on_windows_11
61
61
 
62
62
  # These examples cover CHEF-3467 where unexpected and incorrect
63
63
  # permissions can result on Windows because CookbookFile's