From 35f737054a43cbbaae5ebab400bcfe1198ea6101 Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 2 Mar 2006 23:58:56 +0000 Subject: [PATCH] Fix syntax error in validate_policy() when duplicate policy detected git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3618 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/changelog.txt | 4 +++- Shorewall/compiler | 2 +- Shorewall/releasenotes.txt | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index 7f5d8e526..5240dae97 100644 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -106,4 +106,6 @@ Changes in 3.1.x. 45) Move 'shorecap' to /usr/share/shorewall -46) Add debian prog files. \ No newline at end of file +46) Add debian prog files. + +47) Correct syntax error in validate_policy() diff --git a/Shorewall/compiler b/Shorewall/compiler index adc31751c..02d0f75c7 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -1504,7 +1504,7 @@ validate_policy() chain=${client}2${server} if is_policy_chain $chain ; then - if eval test \$${chain}_is_optional = Yes ; then + if eval test -n \"\$${chain}_is_optional\" ; then eval ${chain}_is_optional= else fatal_error "Duplicate policy: $client $server $policy" diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index 91d98d347..04da6b45a 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -38,6 +38,8 @@ Problems Corrected in 3.1.9 3) An undefined function 'delete_nat' was previously called when a compiled program was issued the 'stop' or 'clear' command. +4) A shell syntax error was reported if a duplicate policy was detected. + Other changes in 3.1.9 1) The 'redhat' distribution is now supported in the compile command's -d