From: Félix-Antoine Fortin Date: Fri, 1 Oct 2021 18:08:24 +0000 (-0400) Subject: Fix uid insync regex for converting to UID X-Git-Tag: v3.3.0~5^2~2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=d1458bada5b359b06d8e7cb9fba91c20c733b16c;p=puppet-modules%2Fpuppetlabs-firewall.git Fix uid insync regex for converting to UID Add support for uid range --- diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index ae751e0..ffbfcb1 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -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