diff options
author | Luke Kanies <luke@madstop.com> | 2008-11-24 12:17:52 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-11-24 12:17:52 -0600 |
commit | b415848841edac9b08ff604416ad2e24dd350b4d (patch) | |
tree | 85d4a612720cbacc2efd4aad1db27afea22b4efe /lib/puppet | |
parent | 9ed382d397c79995e850a91ac92e22106d670bed (diff) | |
download | puppet-b415848841edac9b08ff604416ad2e24dd350b4d.tar.gz puppet-b415848841edac9b08ff604416ad2e24dd350b4d.tar.xz puppet-b415848841edac9b08ff604416ad2e24dd350b4d.zip |
Fixing #1708 - user groups specified as names are now detected correctly.
There was a bug when groups were specified by name -- the group was
always compared to the current gid, rather than being converted to an
integer and comparing that way. This is now fixed.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-rwxr-xr-x | lib/puppet/type/user.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb index 637fe9b46..0fe7928e6 100755 --- a/lib/puppet/type/user.rb +++ b/lib/puppet/type/user.rb @@ -98,6 +98,16 @@ module Puppet end end + def insync?(is) + # We know the 'is' is a number, so we need to convert the 'should' to a number, + # too. + @should.each do |value| + return true if number = Puppet::Util.gid(value) and is == number + end + + return false + end + def sync found = false @should.each do |value| |