diff options
author | Phil Dibowitz <phil@ipom.com> | 2021-03-24 17:48:41 -0700 |
---|---|---|
committer | Phil Dibowitz <phil@ipom.com> | 2021-03-24 17:51:29 -0700 |
commit | 7b04a288d1d30f2b0ebd09d45cb139d1056da6be (patch) | |
tree | fc8f5fabb3e1b88ae78c43160476d36268e650d7 | |
parent | f9fbeaf7a3224f00d45d19bdb2801dddcb61dccf (diff) | |
download | chef-7b04a288d1d30f2b0ebd09d45cb139d1056da6be.tar.gz |
Fix windows_user password idempotency
If we're not trying to set a password - which given #10455 is probably
the case - we will always think it's wrong and try to set it. This fixes
that.
Note it does *not* fix #10657 - do not close that one!
Signed-off-by: Phil Dibowitz <phil@ipom.com>
-rw-r--r-- | lib/chef/provider/user/windows.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/user/windows.rb b/lib/chef/provider/user/windows.rb index 32b2c35264..8cf4ea475b 100644 --- a/lib/chef/provider/user/windows.rb +++ b/lib/chef/provider/user/windows.rb @@ -62,7 +62,7 @@ class Chef # <false>:: If the users are identical def compare_user @change_desc = [] - unless @net_user.validate_credentials(new_resource.password) + if new_resource.password && !@net_user.validate_credentials(new_resource.password) @change_desc << "update password" end |