1 --- chef-14.1.21/lib/chef/provider/user/dscl.rb~ 2018-05-21 18:22:54.000000000 +0200
2 +++ chef-14.1.21/lib/chef/provider/user/dscl.rb 2018-07-14 22:26:52.821861848 +0200
4 require "mixlib/shellout"
5 require "chef/provider/user"
8 require "chef/util/path_helper"
13 # Calling shell_out directly since we want to give an input stream
14 shadow_hash_xml = convert_binary_plist_to_xml(shadow_hash_binary.string)
16 shadow_hash = Plist.parse_xml(shadow_hash_xml)
18 if shadow_hash["SALTED-SHA512"]
21 user_plist_file = "#{USER_PLIST_DIRECTORY}/#{new_resource.username}.plist"
22 user_plist_info = run_plutil("convert", "xml1", "-o", "-", user_plist_file)
24 user_info = Plist.parse_xml(user_plist_info)
25 rescue Chef::Exceptions::PlistUtilCommandFailed
29 def save_user_info(user_info)
30 user_plist_file = "#{USER_PLIST_DIRECTORY}/#{new_resource.username}.plist"
32 Plist::Emit.save_plist(user_info, user_plist_file)
33 run_plutil("convert", "binary1", user_plist_file)