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:
authorMichael Boelen <michael.boelen@cisofy.com>2019-04-17 16:07:07 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-04-17 16:07:07 +0300
commit121c86144643973c71690c690b983ad2482ff9fd (patch)
treef0a0b381cb28baf6224091031a41c8ca8a078f03 /include/tests_ports_packages
parent7c03e5b8b68bbd3c731651224c514b5a0ccfde3f (diff)
Non-interactive mode for zypper
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 dd1a391b..85509218 100644
--- a/include/tests_ports_packages
+++ b/include/tests_ports_packages
@@ -365,7 +365,7 @@
if [ ! -z "${ZYPPERBINARY}" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no PKGS-7330 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Querying Zypper for vulnerable packages"
if [ ${SKIPTEST} -eq 0 ]; then
- FIND=$(${ZYPPERBINARY} --non-interactive -n pchk | ${GREPBINARY} "(0 security patches)")
+ FIND=$(${ZYPPERBINARY} --non-interactive pchk | ${GREPBINARY} "(0 security patches)")
if [ ! -z "${FIND}" ]; then
LogText "Result: No security updates found with Zypper"
Display --indent 2 --text "- Using Zypper to find vulnerable packages" --result "${STATUS_NONE}" --color GREEN
@@ -374,7 +374,7 @@
LogText "Result: Zypper found one or more installed packages which are vulnerable."
ReportWarning ${TEST_NO} "Found one or more vulnerable packages installed"
# Unfortunately zypper does not properly give back which package it is. Usually best guess is last word on the line
- FIND=$(${ZYPPERBINARY} -n lp | ${AWKBINARY} '{ if ($5=="security" || $7=="security") { print $NF }}' | ${SEDBINARY} 's/:$//' | ${GREPBINARY} -v "^$" | ${SORTBINARY} -u)
+ FIND=$(${ZYPPERBINARY} --non-interactive lp | ${AWKBINARY} '{ if ($5=="security" || $7=="security") { print $NF }}' | ${SEDBINARY} 's/:$//' | ${GREPBINARY} -v "^$" | ${SORTBINARY} -u)
LogText "List of vulnerable packages/version:"
for PKG in ${FIND}; do
VULNERABLE_PACKAGES_FOUND=1