diff options
author | Eric Saxby <sax@livinginthepast.org> | 2013-05-22 13:27:54 -0700 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2013-09-24 14:10:20 -0700 |
commit | db00c1da15a083c848d0509ed28bd61cb340829a (patch) | |
tree | c76a206e7e63c67467dbceadd2331d0a46ae5534 /lib/chef/provider/user.rb | |
parent | e46feedadd6842e7b904b45d7c487720e096faf5 (diff) | |
download | chef-db00c1da15a083c848d0509ed28bd61cb340829a.tar.gz |
Use string comparison of user :uid/:gid
String comparison is slightly safer than integer comparison
in cases where :uid/:gid are nil or empty.
Diffstat (limited to 'lib/chef/provider/user.rb')
-rw-r--r-- | lib/chef/provider/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/user.rb b/lib/chef/provider/user.rb index 78aedd1b30..d5656c6beb 100644 --- a/lib/chef/provider/user.rb +++ b/lib/chef/provider/user.rb @@ -115,7 +115,7 @@ class Chef end changed += [ :uid, :gid ].keep_if do |user_attrib| - !@new_resource.send(user_attrib).nil? && @new_resource.send(user_attrib).to_i != @current_resource.send(user_attrib).to_i + !@new_resource.send(user_attrib).nil? && @new_resource.send(user_attrib).to_s != @current_resource.send(user_attrib).to_s end changed.any? |