mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-02 07:56:00 +02:00
Minor tweaks to Config.pm
- Look for unprintable gunk in lines processed by split_line1() - Modify a comment - replace awkward close/assert statement Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
bd9bf3d43a
commit
afa5ea3fd2
@ -1343,6 +1343,7 @@ sub split_line1( $$$;$ ) {
|
|||||||
my ( $mincolumns, $maxcolumns, $description, $nopad) = @_;
|
my ( $mincolumns, $maxcolumns, $description, $nopad) = @_;
|
||||||
|
|
||||||
fatal_error "Shorewall Configuration file entries may not contain double quotes, single back quotes or backslashes" if $currentline =~ /["`\\]/;
|
fatal_error "Shorewall Configuration file entries may not contain double quotes, single back quotes or backslashes" if $currentline =~ /["`\\]/;
|
||||||
|
fatal_error "Non-ASCII gunk in file" if $currentline =~ /[^\s[:print:]]/;
|
||||||
|
|
||||||
my @line = split( ' ', $currentline );
|
my @line = split( ' ', $currentline );
|
||||||
|
|
||||||
@ -1427,7 +1428,7 @@ sub close_file() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Functions for copying files into the script
|
# Functions for copying a file into the script
|
||||||
#
|
#
|
||||||
sub copy( $ ) {
|
sub copy( $ ) {
|
||||||
assert( $script_enabled );
|
assert( $script_enabled );
|
||||||
@ -1779,7 +1780,7 @@ sub embedded_perl( $ ) {
|
|||||||
if ( $perlscript ) {
|
if ( $perlscript ) {
|
||||||
fatal_error "INCLUDEs nested too deeply" if @includestack >= 4;
|
fatal_error "INCLUDEs nested too deeply" if @includestack >= 4;
|
||||||
|
|
||||||
close $perlscript or assert(0);
|
assert( close $perlscript );
|
||||||
|
|
||||||
$perlscript = undef;
|
$perlscript = undef;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user