From da363880a90f0b6bdc2c94b85620825ec58c9901 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 13 Mar 2017 09:51:58 -0700 Subject: [PATCH] Always quote the LEVEL and DEFAULT settings when updating Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 05542607d..8ce5132f6 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -5368,8 +5368,12 @@ sub update_config_file( $ ) { } } - - $val = conditional_quote $val; + if ( supplied $val ) { + # + # Log LEVEL and DEFAULT settings often contain parens + # + $val = ($var =~ /(?:LEVEL|DEFAULT)$/) ? qq("$val") : conditional_quote $val; + } $_ = "$var=$val\n"; }