mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-23 06:38:53 +01: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) = @_;
|
||||
|
||||
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 );
|
||||
|
||||
@ -1427,7 +1428,7 @@ sub close_file() {
|
||||
}
|
||||
|
||||
#
|
||||
# Functions for copying files into the script
|
||||
# Functions for copying a file into the script
|
||||
#
|
||||
sub copy( $ ) {
|
||||
assert( $script_enabled );
|
||||
@ -1779,7 +1780,7 @@ sub embedded_perl( $ ) {
|
||||
if ( $perlscript ) {
|
||||
fatal_error "INCLUDEs nested too deeply" if @includestack >= 4;
|
||||
|
||||
close $perlscript or assert(0);
|
||||
assert( close $perlscript );
|
||||
|
||||
$perlscript = undef;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user