Skip to content

Commit 27ec1b7

Browse files
committed
Fix gid insync regex for converting to GID
1 parent d1458ba commit 27ec1b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/puppet/type/firewall.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,14 +1442,14 @@ def insync?(is)
14421442
# If 'should' contains anything other than digits,
14431443
# we assume that we have to do a lookup to convert
14441444
# to UID
1445-
unless should[%r{[0-9]+}] == should
1445+
unless should[%r{[0-9]+(-[0-9]+)?}] == should
14461446
should = Etc.getgrnam(should).gid
14471447
end
14481448

14491449
# If 'is' contains anything other than digits,
14501450
# we assume that we have to do a lookup to convert
14511451
# to UID
1452-
unless is[%r{[0-9]+}] == is
1452+
unless is[%r{[0-9]+(-[0-9]+)?}] == is
14531453
is = Etc.getgrnam(is).gid
14541454
end
14551455

0 commit comments

Comments
 (0)