forked from extern/shorewall_code
Correct new directives with respect to omitting
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
80d93235b5
commit
356d3fa2dd
@ -2995,58 +2995,70 @@ sub process_compiler_directive( $$$$ ) {
|
||||
} ,
|
||||
|
||||
ERROR => sub() {
|
||||
directive_error( evaluate_expression( $expression ,
|
||||
$filename ,
|
||||
$linenumber ,
|
||||
1 ) ,
|
||||
$actparams{callfile} ,
|
||||
$actparams{callline} ) unless $omitting;
|
||||
unless ( $omitting ) {
|
||||
directive_error( evaluate_expression( $expression ,
|
||||
$filename ,
|
||||
$linenumber ,
|
||||
1 ) ,
|
||||
$actparams{callfile} ,
|
||||
$actparams{callline} ) unless $omitting;
|
||||
}
|
||||
} ,
|
||||
|
||||
WARNING => sub() {
|
||||
directive_warning( $config{VERBOSE_MESSAGES} ,
|
||||
evaluate_expression( $expression ,
|
||||
$filename ,
|
||||
$linenumber ,
|
||||
1 ),
|
||||
$actparams{callfile} ,
|
||||
$actparams{callline} ) unless $omitting;
|
||||
unless ( $omitting ) {
|
||||
directive_warning( $config{VERBOSE_MESSAGES} ,
|
||||
evaluate_expression( $expression ,
|
||||
$filename ,
|
||||
$linenumber ,
|
||||
1 ),
|
||||
$actparams{callfile} ,
|
||||
$actparams{callline} ) unless $omitting;
|
||||
}
|
||||
} ,
|
||||
|
||||
INFO => sub() {
|
||||
directive_info( $config{VERBOSE_MESSAGES} ,
|
||||
evaluate_expression( $expression ,
|
||||
$filename ,
|
||||
$linenumber ,
|
||||
1 ),
|
||||
$actparams{callfile} ,
|
||||
$actparams{callline} ) unless $omitting;
|
||||
unless ( $omitting ) {
|
||||
directive_info( $config{VERBOSE_MESSAGES} ,
|
||||
evaluate_expression( $expression ,
|
||||
$filename ,
|
||||
$linenumber ,
|
||||
1 ),
|
||||
$actparams{callfile} ,
|
||||
$actparams{callline} ) unless $omitting;
|
||||
}
|
||||
} ,
|
||||
|
||||
'WARNING!' => sub() {
|
||||
directive_warning( ! $config{VERBOSE_MESSAGES} ,
|
||||
evaluate_expression( $expression ,
|
||||
$filename ,
|
||||
$linenumber ,
|
||||
1 ),
|
||||
$actparams{callfile} ,
|
||||
$actparams{callline} ) unless $omitting;
|
||||
unless ( $omitting ) {
|
||||
directive_warning( ! $config{VERBOSE_MESSAGES} ,
|
||||
evaluate_expression( $expression ,
|
||||
$filename ,
|
||||
$linenumber ,
|
||||
1 ),
|
||||
$actparams{callfile} ,
|
||||
$actparams{callline} ) unless $omitting;
|
||||
}
|
||||
} ,
|
||||
|
||||
'INFO!' => sub() {
|
||||
directive_info( ! $config{VERBOSE_MESSAGES} ,
|
||||
evaluate_expression( $expression ,
|
||||
$filename ,
|
||||
$linenumber ,
|
||||
1 ),
|
||||
$actparams{callfile} ,
|
||||
$actparams{callline} ) unless $omitting;
|
||||
unless ( $omitting ) {
|
||||
directive_info( ! $config{VERBOSE_MESSAGES} ,
|
||||
evaluate_expression( $expression ,
|
||||
$filename ,
|
||||
$linenumber ,
|
||||
1 ),
|
||||
$actparams{callfile} ,
|
||||
$actparams{callline} ) unless $omitting;
|
||||
}
|
||||
} ,
|
||||
|
||||
REQUIRE => sub() {
|
||||
fatal_error "?REQUIRE may only be used within action files" unless $actparams{0};
|
||||
fatal_error "Unknown capability ($expression}" unless $capabilities{$expression};
|
||||
require_capability( $expression, "The $actparams{action} action", 's' );
|
||||
unless ( $omitting ) {
|
||||
fatal_error "?REQUIRE may only be used within action files" unless $actparams{0};
|
||||
fatal_error "Unknown capability ($expression)" unless $capdesc{$expression};
|
||||
require_capability( $expression, "The $actparams{action} action", 's' );
|
||||
}
|
||||
} ,
|
||||
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user