From f341b01e4d637771d978de534891f2545fabfce5 Mon Sep 17 00:00:00 2001 From: James White Date: Wed, 15 Jul 2015 11:50:56 +0100 Subject: Fix false positive matches with unsafe ports on SQD-3624 The grep statement needs to be modified to prevent tagging port values that contains a value in `SQUID_DAEMON_UNSAFE_PORTS_LIST` but aren't actually the listed port. --- include/tests_squid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tests_squid b/include/tests_squid index 0ce03159..98a4380c 100644 --- a/include/tests_squid +++ b/include/tests_squid @@ -265,7 +265,7 @@ #SQUID_DAEMON_UNSAFE_PORTS_LIST for I in ${SQUID_DAEMON_UNSAFE_PORTS_LIST}; do logtext "Test: Checking port ${I} in Safe_ports list" - FIND2=`grep "^acl Safe_ports port ${I}" ${SQUID_DAEMON_CONFIG}` + FIND2=`grep -w "^acl Safe_ports port ${I}" ${SQUID_DAEMON_CONFIG}` if [ "${FIND2}" = "" ]; then Display --indent 6 --text "- Checking ACL 'Safe_ports' (port ${I})" --result "NOT FOUND" --color GREEN AddHP 1 1 -- cgit v1.2.3