]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Fix uid insync regex for converting to UID
authorFélix-Antoine Fortin <felix-antoine.fortin@calculquebec.ca>
Fri, 1 Oct 2021 18:08:24 +0000 (14:08 -0400)
committerFélix-Antoine Fortin <felix-antoine.fortin@calculquebec.ca>
Fri, 1 Oct 2021 18:08:24 +0000 (14:08 -0400)
Add support for uid range

lib/puppet/type/firewall.rb

index ae751e0c3bf3e7e542183d949bc44dd1365ee1b0..ffbfcb1b2dd34f3e7ae41eb946e28b83738f3023 100644 (file)
@@ -1393,14 +1393,14 @@ Puppet::Type.newtype(:firewall) do
       # If 'should' contains anything other than digits,
       # we assume that we have to do a lookup to convert
       # to UID
-      unless should[%r{[0-9]+}] == should
+      unless should[%r{[0-9]+(-[0-9]+)?}] == should
         should = Etc.getpwnam(should).uid
       end
 
       # If 'is' contains anything other than digits,
       # we assume that we have to do a lookup to convert
       # to UID
-      unless is[%r{[0-9]+}] == is
+      unless is[%r{[0-9]+(-[0-9]+)?}] == is
         is = Etc.getpwnam(is).uid
       end