From dea3c2b530444f702f6987671681aa1f981ee5f2 Mon Sep 17 00:00:00 2001 From: Pat Cox Date: Mon, 5 Jan 2015 21:33:39 -0800 Subject: 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 --- lib/chef/provider/user/dscl.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/chef/provider/user/dscl.rb') 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 -- cgit v1.2.1