Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsilentcreek <silentcreek@users.noreply.github.com>2019-03-07 12:03:11 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-03-07 12:03:11 +0300
commit17f2e34660b9be19ad671feb783bf957703fa038 (patch)
tree8c3bba60840048c38daacb29e64f30686e89e930 /include/tests_ports_packages
parent89bf6074988b70cac8e3a63b0110b9540700d863 (diff)
[PKGS-7388] Fix false positive warning on missing security archive (#651)
Currently the check for the security archive in Debian/Ubuntu fails, if the archive is not hosted on security.{debian,ubuntu}.org and the URL does have trailing slash, such as this: deb http://deb.debian.org/debian-security/ stretch/updates main Change the regular expression to allow for a trailing slash in the URL when filtering the package sources lists. Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de>
Diffstat (limited to 'include/tests_ports_packages')
-rw-r--r--include/tests_ports_packages4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/tests_ports_packages b/include/tests_ports_packages
index 9a22e8a4..1426a068 100644
--- a/include/tests_ports_packages
+++ b/include/tests_ports_packages
@@ -993,7 +993,7 @@
if [ ${OPTION_DEBIAN_SKIP_SECURITY_REPOSITORY} -eq 0 ]; then
if [ -f ${ROOTDIR}etc/apt/sources.list ]; then
LogText "Searching for security.debian.org/security.ubuntu.com or security repositories in /etc/apt/sources.list file"
- FIND=$(${EGREPBINARY} "security.debian.org|security.ubuntu.com|security " ${ROOTDIR}etc/apt/sources.list | ${GREPBINARY} -v '#' | ${SEDBINARY} 's/ /!space!/g')
+ FIND=$(${EGREPBINARY} "security.debian.org|security.ubuntu.com|security/? " ${ROOTDIR}etc/apt/sources.list | ${GREPBINARY} -v '#' | ${SEDBINARY} 's/ /!space!/g')
if [ ! -z "${FIND}" ]; then
FOUND=1
Display --indent 2 --text "- Checking security repository in sources.list file" --result "${STATUS_OK}" --color GREEN
@@ -1006,7 +1006,7 @@
fi
if [ -d /etc/apt/sources.list.d ]; then
LogText "Searching for security.debian.org/security.ubuntu.com or security repositories in /etc/apt/sources.list.d directory"
- FIND=$(${EGREPBINARY} -r "security.debian.org|security.ubuntu.com|security " /etc/apt/sources.list.d | ${GREPBINARY} -v '#' | ${SEDBINARY} 's/ /!space!/g')
+ FIND=$(${EGREPBINARY} -r "security.debian.org|security.ubuntu.com|security/? " /etc/apt/sources.list.d | ${GREPBINARY} -v '#' | ${SEDBINARY} 's/ /!space!/g')
if [ ! -z "${FIND}" ]; then
FOUND=1
Display --indent 2 --text "- Checking security repository in sources.list.d directory" --result "${STATUS_OK}" --color GREEN