summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG3
-rwxr-xr-xlib/puppet/util/posix.rb7
2 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index e2b656333..35e2e44dc 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+ Added calls to endpwent/endgrent when searching for user and group IDs,
+ which fixes #791.
+
Obviated 'target' in interfaces, as all file paths were automatically
calculated anyway. The parameter is still there, but it's
not used and just generates a warning.
diff --git a/lib/puppet/util/posix.rb b/lib/puppet/util/posix.rb
index 84fb744a9..c518a8797 100755
--- a/lib/puppet/util/posix.rb
+++ b/lib/puppet/util/posix.rb
@@ -53,6 +53,13 @@ module Puppet::Util::POSIX
return object.send(field)
end
end
+
+ # Apparently the group/passwd methods need to get reset; if we skip
+ # this call, then new users aren't found.
+ case type
+ when :passwd: Etc.send(:endpwent)
+ when :group: Etc.send(:endgrent)
+ end
return nil
end