diff options
author | Pat Cox <pcox@fb.com> | 2015-01-05 21:33:39 -0800 |
---|---|---|
committer | Pat Cox <pcox@fb.com> | 2015-01-12 21:22:52 -0800 |
commit | dea3c2b530444f702f6987671681aa1f981ee5f2 (patch) | |
tree | 826c864ad55546b793f369727856f9fafdd2b62f /lib/chef/provider/user/dscl.rb | |
parent | 15f36de72cc63e8ee986d15fc0db4f0736e3cb1b (diff) | |
download | chef-dea3c2b530444f702f6987671681aa1f981ee5f2.tar.gz |
OS X user provider - fix exception if no salt is found
Some system users don't have salts. This exception is fixed by this
commit:
# in `convert_to_binary':
NoMethodError: undefined method `size' for nil:NilClass
Diffstat (limited to 'lib/chef/provider/user/dscl.rb')
-rw-r--r-- | lib/chef/provider/user/dscl.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/provider/user/dscl.rb b/lib/chef/provider/user/dscl.rb index 39746f0018..4be7150145 100644 --- a/lib/chef/provider/user/dscl.rb +++ b/lib/chef/provider/user/dscl.rb @@ -504,6 +504,7 @@ user password using shadow hash.") # password to be updated. return true if salted_sha512?(@current_resource.password) + return true if @current_resource.salt.nil? if salted_sha512_pbkdf2?(@new_resource.password) diverged?(:password) || diverged?(:salt) || diverged?(:iterations) else |