From da3e1b720c73e923ba5fc98345f0e4a4b677f679 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 19 Jun 2012 06:15:53 -0700 Subject: [PATCH] Apply user/group Id range patch from Gergely Risko Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 5f9a3931f..709949dde 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -4220,12 +4220,12 @@ sub do_user( $ ) { if ( supplied $2 ) { $user = $2; - $user = resolve_id( $user, 'user' ) unless $user =~ /\d+$/; + $user = resolve_id( $user, 'user' ) unless $user =~ /\d+(-\d+)?$/; $rule .= "${invert}--uid-owner $user "; } if ( $group ne '' ) { - $group = resolve_id( $group, 'group' ) unless $group =~ /^\d+$/; + $group = resolve_id( $group, 'group' ) unless $group =~ /^\d+(-\d+)?$/; $rule .= "${invert}--gid-owner $group "; } } elsif ( $user =~ /^(!)?(.*)$/ ) { @@ -4233,10 +4233,10 @@ sub do_user( $ ) { $user = $2; fatal_error "Invalid USER/GROUP (!)" if $user eq ''; - $user = resolve_id ($user, 'user' ) unless $user =~ /\d+$/; + $user = resolve_id ($user, 'user' ) unless $user =~ /\d+(-\d+)?$/; $rule .= "${invert}--uid-owner $user "; } else { - $user = resolve_id( $user, 'user' ) unless $user =~ /\d+$/; + $user = resolve_id( $user, 'user' ) unless $user =~ /\d+(-\d+)?$/; $rule .= "--uid-owner $user "; }