forked from extern/shorewall_code
Remove INLINE_MATCHES
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
3903fe5fd9
commit
73b39abd62
@ -582,8 +582,8 @@ sub compile_info_command() {
|
||||
#
|
||||
sub compiler {
|
||||
|
||||
my ( $scriptfilename, $directory, $verbosity, $timestamp , $debug, $chains , $log , $log_verbosity, $preview, $confess , $update , $annotate , $config_path, $shorewallrc , $shorewallrc1 , $inline ) =
|
||||
( '', '', -1, '', 0, '', '', -1, 0, 0, 0, 0, , '' , '/usr/share/shorewall/shorewallrc', '' , 0 );
|
||||
my ( $scriptfilename, $directory, $verbosity, $timestamp , $debug, $chains , $log , $log_verbosity, $preview, $confess , $update , $annotate , $config_path, $shorewallrc , $shorewallrc1 ) =
|
||||
( '', '', -1, '', 0, '', '', -1, 0, 0, 0, 0, , '' , '/usr/share/shorewall/shorewallrc', '' );
|
||||
|
||||
$export = 0;
|
||||
$test = 0;
|
||||
@ -620,7 +620,6 @@ sub compiler {
|
||||
confess => { store => \$confess, validate=> \&validate_boolean } ,
|
||||
update => { store => \$update, validate=> \&validate_boolean } ,
|
||||
annotate => { store => \$annotate, validate=> \&validate_boolean } ,
|
||||
inline => { store => \$inline, validate=> \&validate_boolean } ,
|
||||
config_path => { store => \$config_path } ,
|
||||
shorewallrc => { store => \$shorewallrc } ,
|
||||
shorewallrc1 => { store => \$shorewallrc1 } ,
|
||||
@ -657,7 +656,7 @@ sub compiler {
|
||||
# S H O R E W A L L R C ,
|
||||
# S H O R E W A L L . C O N F A N D C A P A B I L I T I E S
|
||||
#
|
||||
get_configuration( $export , $update , $annotate , $inline );
|
||||
get_configuration( $export , $update , $annotate );
|
||||
#
|
||||
# Chain table initialization depends on shorewall.conf and capabilities. So it must be deferred until
|
||||
# now when shorewall.conf has been processed and the capabilities have been determined.
|
||||
|
@ -665,7 +665,6 @@ our $comments_allowed; # True if [?]COMMENT is allowed in the current file
|
||||
our $nocomment; # When true, ignore [?]COMMENT in the current file
|
||||
our $sr_comment; # When true, $comment should only be applied to the current rule
|
||||
our $warningcount; # Used to suppress duplicate warnings about missing COMMENT support
|
||||
our $checkinline; # The -i option to check/compile/etc.
|
||||
our $directive_callback; # Function to call in compiler_directive
|
||||
|
||||
our $shorewall_dir; # Shorewall Directory; if non-empty, search here first for files.
|
||||
@ -708,13 +707,13 @@ our %validlevels; # Valid log levels.
|
||||
# Deprecated options with their default values
|
||||
#
|
||||
our %deprecated = (
|
||||
LEGACY_RESTART => 'no'
|
||||
LEGACY_RESTART => 'no' ,
|
||||
);
|
||||
#
|
||||
# Deprecated options that are eliminated via update
|
||||
#
|
||||
our %converted = (
|
||||
LEGACY_RESTART => 1
|
||||
LEGACY_RESTART => 1 ,
|
||||
);
|
||||
#
|
||||
# Eliminated options
|
||||
@ -730,6 +729,7 @@ our %eliminated = ( LOGRATE => 1,
|
||||
CHAIN_SCRIPTS => 1,
|
||||
MODULE_SUFFIX => 1,
|
||||
MAPOLDACTIONS => 1,
|
||||
INLINE_MATCHES => 1,
|
||||
);
|
||||
#
|
||||
# Variables involved in ?IF, ?ELSE ?ENDIF processing
|
||||
@ -979,7 +979,6 @@ sub initialize( $;$$$) {
|
||||
USE_RT_NAMES => undef,
|
||||
TRACK_RULES => undef,
|
||||
REJECT_ACTION => undef,
|
||||
INLINE_MATCHES => undef,
|
||||
BASIC_FILTERS => undef,
|
||||
WORKAROUNDS => undef ,
|
||||
LEGACY_RESTART => undef ,
|
||||
@ -2391,8 +2390,6 @@ sub clear_comment();
|
||||
sub split_line2( $$;$$$ ) {
|
||||
my ( $description, $columnsref, $nopad, $maxcolumns, $inline ) = @_;
|
||||
|
||||
my $inlinematches = $config{INLINE_MATCHES};
|
||||
|
||||
my ( $columns, $pairs, $rest );
|
||||
|
||||
my $currline = $currentline;
|
||||
@ -2420,7 +2417,7 @@ sub split_line2( $$;$$$ ) {
|
||||
#
|
||||
# Don't look for matches below
|
||||
#
|
||||
$inline = $inlinematches = '';
|
||||
$inline = '';
|
||||
}
|
||||
}
|
||||
#
|
||||
@ -2434,21 +2431,7 @@ sub split_line2( $$;$$$ ) {
|
||||
#
|
||||
fatal_error "Only one semicolon (';') allowed on a line" if defined $rest;
|
||||
|
||||
if ( $inlinematches ) {
|
||||
fatal_error "The $description does not support inline matches (INLINE_MATCHES=Yes)" unless $inline;
|
||||
|
||||
$inline_matches = $pairs;
|
||||
|
||||
if ( $columns =~ /^(\s*|.*[^&@%])\{(.*)\}\s*$/ ) {
|
||||
#
|
||||
# Pairs are enclosed in curly brackets.
|
||||
#
|
||||
$columns = $1;
|
||||
$pairs = $2;
|
||||
} else {
|
||||
$pairs = '';
|
||||
}
|
||||
} elsif ( $inline ) {
|
||||
if ( $inline ) {
|
||||
#
|
||||
# This file supports INLINE or IPTABLES
|
||||
#
|
||||
@ -2462,12 +2445,9 @@ sub split_line2( $$;$$$ ) {
|
||||
$columns = $1;
|
||||
$pairs = $2;
|
||||
} else {
|
||||
warning_message "This entry needs to be changed before INLINE_MATCHES can be set to Yes" if $checkinline;
|
||||
$pairs = '';
|
||||
}
|
||||
}
|
||||
} elsif ( $checkinline ) {
|
||||
warning_message "This entry needs to be changed before INLINE_MATCHES can be set to Yes";
|
||||
}
|
||||
} elsif ( $currline =~ /^(\s*|.*[^&@%])\{(.*)\}$/ ) {
|
||||
#
|
||||
@ -6097,9 +6077,9 @@ EOF
|
||||
# - Read the capabilities file, if any
|
||||
# - establish global hashes %params, %config , %globals and %capabilities
|
||||
#
|
||||
sub get_configuration( $$$$ ) {
|
||||
sub get_configuration( $$$ ) {
|
||||
|
||||
( my ( $export, $update, $annotate ) , $checkinline ) = @_;
|
||||
my ( $export, $update, $annotate ) = @_;
|
||||
|
||||
$globals{EXPORT} = $export;
|
||||
|
||||
|
@ -40,7 +40,6 @@
|
||||
# --shorewallrc=<path> # Path to global shorewallrc file.
|
||||
# --shorewallrc1=<path> # Path to export shorewallrc file.
|
||||
# --config_path=<path-list> # Search path for config files
|
||||
# --inline # Update alternative column specifications
|
||||
# --update # Update configuration to current release
|
||||
#
|
||||
# If the <filename> is omitted, then a 'check' operation is performed.
|
||||
@ -75,7 +74,6 @@ usage: compiler.pl [ <option> ... ] [ <filename> ]
|
||||
[ --shorewallrc=<pathname> ]
|
||||
[ --shorewallrc1=<pathname> ]
|
||||
[ --config_path=<path-list> ]
|
||||
[ --inline ]
|
||||
_EOF_
|
||||
|
||||
exit shift @_;
|
||||
@ -102,7 +100,6 @@ my $update = 0;
|
||||
my $config_path = '';
|
||||
my $shorewallrc = '';
|
||||
my $shorewallrc1 = '';
|
||||
my $inline = 0;
|
||||
|
||||
Getopt::Long::Configure ('bundling');
|
||||
|
||||
@ -132,7 +129,6 @@ my $result = GetOptions('h' => \$help,
|
||||
'annotate' => \$annotate,
|
||||
'u' => \$update,
|
||||
'update' => \$update,
|
||||
'inline' => \$inline,
|
||||
'config_path=s' => \$config_path,
|
||||
'shorewallrc=s' => \$shorewallrc,
|
||||
'shorewallrc1=s' => \$shorewallrc1,
|
||||
@ -159,5 +155,4 @@ compiler( script => $ARGV[0] || '',
|
||||
config_path => $config_path,
|
||||
shorewallrc => $shorewallrc,
|
||||
shorewallrc1 => $shorewallrc1,
|
||||
inline => $inline,
|
||||
);
|
||||
|
@ -490,7 +490,6 @@ compiler() {
|
||||
[ -n "$g_confess" ] && options="$options --confess"
|
||||
[ -n "$g_update" ] && options="$options --update"
|
||||
[ -n "$g_annotate" ] && options="$options --annotate"
|
||||
[ -n "$g_inline" ] && options="$options --inline"
|
||||
|
||||
if [ -n "$PERL" ]; then
|
||||
if [ ! -x "$PERL" ]; then
|
||||
@ -595,10 +594,6 @@ start_command() {
|
||||
g_confess=Yes
|
||||
option=${option#T}
|
||||
;;
|
||||
i*)
|
||||
g_inline=Yes
|
||||
option=${option#i}
|
||||
;;
|
||||
C*)
|
||||
g_counters=Yes
|
||||
option=${option#C}
|
||||
@ -709,10 +704,6 @@ compile_command() {
|
||||
g_confess=Yes
|
||||
option=${option#T}
|
||||
;;
|
||||
i*)
|
||||
g_inline=Yes
|
||||
option=${option#i}
|
||||
;;
|
||||
-)
|
||||
finished=1
|
||||
option=
|
||||
@ -807,10 +798,6 @@ check_command() {
|
||||
g_confess=Yes
|
||||
option=${option#T}
|
||||
;;
|
||||
i*)
|
||||
g_inline=Yes
|
||||
option=${option#i}
|
||||
;;
|
||||
*)
|
||||
option_error $option
|
||||
;;
|
||||
@ -895,16 +882,11 @@ update_command() {
|
||||
g_confess=Yes
|
||||
option=${option#T}
|
||||
;;
|
||||
i*)
|
||||
g_inline=Yes
|
||||
option=${option#i}
|
||||
;;
|
||||
a*)
|
||||
g_annotate=Yes
|
||||
option=${option#a}
|
||||
;;
|
||||
A*)
|
||||
g_inline=Yes
|
||||
option=${option#A}
|
||||
;;
|
||||
*)
|
||||
@ -994,7 +976,6 @@ restart_command() {
|
||||
option=${option#T}
|
||||
;;
|
||||
i*)
|
||||
g_inline=Yes
|
||||
option=${option#i}
|
||||
;;
|
||||
C*)
|
||||
@ -1420,10 +1401,6 @@ remote_reload_command() # $* = original arguments less the command.
|
||||
g_confess=Yes
|
||||
option=${option#T}
|
||||
;;
|
||||
i*)
|
||||
g_inline=Yes
|
||||
option=${option#i}
|
||||
;;
|
||||
*)
|
||||
option_error $option
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user