From c819e1fea7fe1f1367df2ad0e637d309b7ac87fd Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 7 Feb 2008 19:16:25 +0000 Subject: [PATCH] Beef up check in do_user() git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8162 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Chains.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 52f8549c4..16c64c129 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -1194,9 +1194,9 @@ sub do_user( $ ) { } elsif ( $user =~ /^(.*):(.*)$/ ) { $rule .= "--uid-owner $1 " if defined $1 && $1 ne ''; $rule .= "--gid-owner $2 " if defined $2 && $2 ne ''; - } elsif ( $user =~ /^!/ ) { - $user =~ s/!//; - $rule .= "! --uid-owner $user "; + } elsif ( $user =~ /^!(.*)$/ ) { + fatal_error "Invalid USER/GROUP (!)" if $1 eq ''; + $rule .= "! --uid-owner $1 "; } else { $rule .= "--uid-owner $user "; }