summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Saxby <sax@livinginthepast.org>2013-05-22 13:27:54 -0700
committerBryan McLellan <btm@opscode.com>2013-09-24 14:10:20 -0700
commitdb00c1da15a083c848d0509ed28bd61cb340829a (patch)
treec76a206e7e63c67467dbceadd2331d0a46ae5534
parente46feedadd6842e7b904b45d7c487720e096faf5 (diff)
downloadchef-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.
-rw-r--r--lib/chef/provider/user.rb2
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?