mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-24 15:18:53 +01:00
Validate macro params in action files; don't complain about RSH_/RCP_COMMAND in shorewall.conf
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6338 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
3a5b81082b
commit
67ba788889
@ -315,7 +315,13 @@ sub process_action1 ( $$ ) {
|
||||
} elsif ( $target eq 'COMMENT' ) {
|
||||
fatal_error "Invalid TARGET ($wholetarget)" unless $wholetarget eq $target;
|
||||
} else {
|
||||
$target =~ s!/.*$!!;
|
||||
( $target, my $param ) = split '/', $target;
|
||||
|
||||
if ( defined $param ) {
|
||||
my $paramtype = $targets{$param} || 0;
|
||||
|
||||
fatal_error "Parameter value not allowed in action files ($param)" if $paramtype & NATRULE;
|
||||
}
|
||||
|
||||
if ( find_macro $target ) {
|
||||
process_macro1( $action, $macros{$target} );
|
||||
|
@ -122,6 +122,11 @@ our %config =
|
||||
ACCEPT_DEFAULT => undef,
|
||||
QUEUE_DEFAULT => undef,
|
||||
#
|
||||
# RSH/RCP Commands
|
||||
#
|
||||
RSH_COMMAND => undef,
|
||||
RCP_COMMAND => undef,
|
||||
#
|
||||
# Firewall Options
|
||||
#
|
||||
BRIDGING => undef,
|
||||
|
Loading…
Reference in New Issue
Block a user