forked from extern/shorewall_code
Fatal error for empty action file
- Issue error if a file with the name of the action exists on the CONFIG_PATH Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
612eee64d1
commit
095c9212f4
@ -2059,17 +2059,17 @@ sub process_action(\$\$$) {
|
|||||||
|
|
||||||
for my $proto (split_list( $protos, 'Protocol' ) ) {
|
for my $proto (split_list( $protos, 'Protocol' ) ) {
|
||||||
process_snat1( $chainref,
|
process_snat1( $chainref,
|
||||||
$action,
|
$action,
|
||||||
$source,
|
$source,
|
||||||
$dest,
|
$dest,
|
||||||
$proto,
|
$proto,
|
||||||
$port,
|
$port,
|
||||||
$ipsec,
|
$ipsec,
|
||||||
$mark,
|
$mark,
|
||||||
$user,
|
$user,
|
||||||
$condition,
|
$condition,
|
||||||
$origdest,
|
$origdest,
|
||||||
$probability,
|
$probability,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2082,6 +2082,12 @@ sub process_action(\$\$$) {
|
|||||||
|
|
||||||
pop_open;
|
pop_open;
|
||||||
|
|
||||||
|
unless ( @{$chainref->{rules}} ) {
|
||||||
|
my $file = find_file( $action );
|
||||||
|
|
||||||
|
fatal_error "File action.${action} is empty and file $action exists - the two must be combined as described in the Migration Considerations section of the Shorewall release notes" if -f $file;
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Pop the action parameters
|
# Pop the action parameters
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user