mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-18 12:20:42 +01:00
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 "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 ) {
|
||||
|
@ -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 ) ,
|
||||
$restrictions{$chain} | $restriction,
|
||||
do_proto( $proto, $ports, $sports) .
|
||||
|
Loading…
Reference in New Issue
Block a user