Skip to content

Commit d1458ba

Browse files
committed
Fix uid insync regex for converting to UID
Add support for uid range
1 parent 4699cd5 commit d1458ba

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
@@ -1393,14 +1393,14 @@ def insync?(is)
13931393
# If 'should' contains anything other than digits,
13941394
# we assume that we have to do a lookup to convert
13951395
# to UID
1396-
unless should[%r{[0-9]+}] == should
1396+
unless should[%r{[0-9]+(-[0-9]+)?}] == should
13971397
should = Etc.getpwnam(should).uid
13981398
end
13991399

14001400
# If 'is' contains anything other than digits,
14011401
# we assume that we have to do a lookup to convert
14021402
# to UID
1403-
unless is[%r{[0-9]+}] == is
1403+
unless is[%r{[0-9]+(-[0-9]+)?}] == is
14041404
is = Etc.getpwnam(is).uid
14051405
end
14061406

0 commit comments

Comments
 (0)