Bug #643
changing group "X" to group "X" (same group) message due to newer versions of debian broken lib
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | 0.23.0 | |||
| Affected Puppet version: | 0.25.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
patch is below, YMMV
Index: posix.rb
===================================================================
--- posix.rb (revision 2525)
+++ posix.rb (working copy)
@@ -65,6 +65,18 @@
end
end
end
+
+ #
+ # Adding this because recent versions of debian have a broken getgrgid()
+ # We want to match either a numeric or nominal value
+ def stubborn_getgrgid(group)
+ Etc.group { |g|
+ if (g.gid == group || g.name == group)
+ return g.gid
+ end
+ }
+ end
+
# Determine what the field name is for users and groups.
def idfield(space)
@@ -78,7 +90,7 @@
# Get the GID of a given group, provided either a GID or a name
def gid(group)
- get_provider_value(:group, :gid, group) or get_posix_field(:gr, :gid, group)
+ stubborn_getgrgid(group) or get_provider_value(:group, :gid, group) or get_posix_field(:gr, :gid, group)
end
# Get the UID of a given user, whether a UID or name is provided
History
Updated by Luke Kanies almost 5 years ago
- Status changed from 1 to 2
Updated by Luke Kanies almost 5 years ago
- Status changed from 2 to Closed
- 7 set to fixed
Fixed in r2598.