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 "; }