forked from extern/shorewall_code
Ensure USER/GROUP is only specified when SOURCE in $FW
This commit is contained in:
parent
359de906ca
commit
bbab1c9682
@ -1751,6 +1751,7 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$ ) {
|
|||||||
|
|
||||||
fatal_error "Missing source zone" if $sourcezone eq '-' || $sourcezone =~ /^:/;
|
fatal_error "Missing source zone" if $sourcezone eq '-' || $sourcezone =~ /^:/;
|
||||||
fatal_error "Unknown source zone ($sourcezone)" unless $sourceref = defined_zone( $sourcezone );
|
fatal_error "Unknown source zone ($sourcezone)" unless $sourceref = defined_zone( $sourcezone );
|
||||||
|
fatal_error 'USER/GROUP may only be specified when the SOURCE zone is $FW' unless $user eq '-' || $sourcezone eq firewall_zone;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $actiontype & NATONLY ) {
|
if ( $actiontype & NATONLY ) {
|
||||||
|
@ -406,6 +406,8 @@ sub process_tc_rule( ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fatal_error "USER/GROUP only allowed in the OUTPUT chain" unless ( $user eq '-' || $chain eq 'tcout' );
|
||||||
|
|
||||||
if ( ( my $result = expand_rule( ensure_chain( 'mangle' , $chain ) ,
|
if ( ( my $result = expand_rule( ensure_chain( 'mangle' , $chain ) ,
|
||||||
$restrictions{$chain} | $restriction,
|
$restrictions{$chain} | $restriction,
|
||||||
do_proto( $proto, $ports, $sports) .
|
do_proto( $proto, $ports, $sports) .
|
||||||
|
Loading…
Reference in New Issue
Block a user