diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-09 07:53:56 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-09 07:53:56 -0800 |
commit | f073747786abbe6ada55ed24b696a03e39c3c45d (patch) | |
tree | 7971d871e89d522a58291713761a6c83f68e8d19 /lib/chef/provider/user/dscl.rb | |
parent | c6e69783705cfd48bfea0c943dc071964dd21311 (diff) | |
download | chef-f073747786abbe6ada55ed24b696a03e39c3c45d.tar.gz |
auto fixing some rubocops
Style/NegatedWhile
Style/ParenthesesAroundCondition
Style/WhileUntilDo
Style/WordArray
Performance/ReverseEach
Style/ColonMethodCall
Diffstat (limited to 'lib/chef/provider/user/dscl.rb')
-rw-r--r-- | lib/chef/provider/user/dscl.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/provider/user/dscl.rb b/lib/chef/provider/user/dscl.rb index e81a01c764..8c282b0d7e 100644 --- a/lib/chef/provider/user/dscl.rb +++ b/lib/chef/provider/user/dscl.rb @@ -130,7 +130,7 @@ user password using shadow hash.") # 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"] # Convert the shadow value from Base64 encoding to hex before consuming them @@ -212,7 +212,7 @@ user password using shadow hash.") # def dscl_set_uid # XXX: mutates the new resource - new_resource.uid(get_free_uid) if (new_resource.uid.nil? || new_resource.uid == "") + new_resource.uid(get_free_uid) if new_resource.uid.nil? || new_resource.uid == "" if uid_used?(new_resource.uid) raise(Chef::Exceptions::RequestedUIDUnavailable, "uid #{new_resource.uid} is already in use") @@ -410,7 +410,7 @@ user password using shadow hash.") salt = OpenSSL::Random.random_bytes(32) iterations = new_resource.iterations # Use the default if not specified by the user - entropy = OpenSSL::PKCS5::pbkdf2_hmac( + entropy = OpenSSL::PKCS5.pbkdf2_hmac( new_resource.password, salt, iterations, @@ -589,7 +589,7 @@ user password using shadow hash.") 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 @@ -695,7 +695,7 @@ user password using shadow hash.") def salted_sha512_pbkdf2_password_match? salt = convert_to_binary(current_resource.salt) - OpenSSL::PKCS5::pbkdf2_hmac( + OpenSSL::PKCS5.pbkdf2_hmac( new_resource.password, salt, current_resource.iterations, |