]>
Commit | Line | Data |
---|---|---|
c8ed2d9c ER |
1 | --- chef-12.10.24/lib/chef/provider/user/dscl.rb~ 2016-06-01 23:58:45.000000000 +0300 |
2 | +++ chef-12.10.24/lib/chef/provider/user/dscl.rb 2016-06-02 00:00:22.479841208 +0300 | |
fce4f0b8 | 3 | @@ -19,7 +19,6 @@ |
c8ed2d9c ER |
4 | require "mixlib/shellout" |
5 | require "chef/provider/user" | |
6 | require "openssl" | |
7 | -require "plist" | |
8 | require "chef/util/path_helper" | |
fce4f0b8 ER |
9 | |
10 | class Chef | |
c8ed2d9c | 11 | @@ -130,6 +129,7 @@ |
fce4f0b8 ER |
12 | |
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) | |
c8ed2d9c ER |
15 | + require "plist" |
16 | shadow_hash = Plist.parse_xml(shadow_hash_xml) | |
fce4f0b8 ER |
17 | |
18 | if shadow_hash["SALTED-SHA512"] | |
c8ed2d9c | 19 | @@ -589,6 +589,7 @@ |
fce4f0b8 | 20 | begin |
c8ed2d9c | 21 | user_plist_file = "#{USER_PLIST_DIRECTORY}/#{new_resource.username}.plist" |
fce4f0b8 | 22 | user_plist_info = run_plutil("convert xml1 -o - #{user_plist_file}") |
c8ed2d9c ER |
23 | + require "plist" |
24 | user_info = Plist.parse_xml(user_plist_info) | |
fce4f0b8 ER |
25 | rescue Chef::Exceptions::PlistUtilCommandFailed |
26 | end | |
c8ed2d9c ER |
27 | @@ -601,6 +602,7 @@ |
28 | # in DSCL_PROPERTY_MAP to the disk. | |
fce4f0b8 ER |
29 | # |
30 | def save_user_info(user_info) | |
c8ed2d9c ER |
31 | + require "plist" |
32 | user_plist_file = "#{USER_PLIST_DIRECTORY}/#{new_resource.username}.plist" | |
fce4f0b8 ER |
33 | Plist::Emit.save_plist(user_info, user_plist_file) |
34 | run_plutil("convert binary1 #{user_plist_file}") |