diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-04-10 14:49:58 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-04-10 14:49:58 -0700 |
commit | ce0b759f885675a786166b8ac556aa0942352294 (patch) | |
tree | 87b1fc65331199b1bb0846d95550f1ee1c036010 /lib/chef/provider/user | |
parent | f8e6b11112e3114168725f6ad55537efb40a341e (diff) | |
download | chef-ce0b759f885675a786166b8ac556aa0942352294.tar.gz |
Make sure we're always using the right Plist class
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/provider/user')
-rw-r--r-- | lib/chef/provider/user/dscl.rb | 6 | ||||
-rw-r--r-- | lib/chef/provider/user/mac.rb | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/provider/user/dscl.rb b/lib/chef/provider/user/dscl.rb index 687fc021da..a46ecb3a62 100644 --- a/lib/chef/provider/user/dscl.rb +++ b/lib/chef/provider/user/dscl.rb @@ -118,7 +118,7 @@ in 'password', with the associated 'salt' and 'iterations'.") # Calling shell_out directly since we want to give an input stream shadow_hash_xml = convert_binary_plist_to_xml(shadow_hash_binary.string) - shadow_hash = Plist.parse_xml(shadow_hash_xml) + shadow_hash = ::Plist.parse_xml(shadow_hash_xml) if shadow_hash["SALTED-SHA512-PBKDF2"] # 10.7+ contains this, but we retain the check in case it goes away in the future @password_shadow_conversion_algorithm = "SALTED-SHA512-PBKDF2" @@ -541,7 +541,7 @@ in 'password', with the associated 'salt' and 'iterations'.") begin user_plist_file = "#{USER_PLIST_DIRECTORY}/#{new_resource.username}.plist" user_plist_info = run_plutil("convert", "xml1", "-o", "-", user_plist_file) - user_info = Plist.parse_xml(user_plist_info) + user_info = ::Plist.parse_xml(user_plist_info) rescue Chef::Exceptions::PlistUtilCommandFailed end @@ -554,7 +554,7 @@ in 'password', with the associated 'salt' and 'iterations'.") # def save_user_info(user_info) user_plist_file = "#{USER_PLIST_DIRECTORY}/#{new_resource.username}.plist" - Plist::Emit.save_plist(user_info, user_plist_file) + ::Plist::Emit.save_plist(user_info, user_plist_file) run_plutil("convert", "binary1", user_plist_file) end diff --git a/lib/chef/provider/user/mac.rb b/lib/chef/provider/user/mac.rb index 62575851e5..104cf51abe 100644 --- a/lib/chef/provider/user/mac.rb +++ b/lib/chef/provider/user/mac.rb @@ -80,7 +80,7 @@ class Chef admin_group_xml = run_dscl("read", "/Groups/admin") return nil unless admin_group_xml && admin_group_xml != "" - @admin_group_plist = Plist.new(::Plist.parse_xml(admin_group_xml)) + @admin_group_plist = ::Plist.new(::Plist.parse_xml(admin_group_xml)) end def reload_user_plist @@ -95,7 +95,7 @@ class Chef return nil if user_xml.nil? || user_xml == "" - @user_plist = Plist.new(::Plist.parse_xml(user_xml)) + @user_plist = ::Plist.new(::Plist.parse_xml(user_xml)) return unless user_plist[:shadow_hash] |