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>2020-03-31 17:31:41 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2020-03-31 17:31:41 +0300
commita38e2b535e09ec12e58a9243ef942c9f778acb7a (patch)
treeeaabc43e917dd73dc5aa493915d9db6f63f4d5ed /include/functions
parent5f13de96a415fdcea8fd79a7538083a419033139 (diff)
Corrected case where binaries were not checked while we do want to use dmidecode if it available
Diffstat (limited to 'include/functions')
-rw-r--r--include/functions2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/functions b/include/functions
index fd47cd3d..63cc4864 100644
--- a/include/functions
+++ b/include/functions
@@ -1774,6 +1774,8 @@
# dmidecode
# Values: VMware Virtual Platform / VirtualBox
if [ -z "${SHORT}" ]; then
+ # Try to find dmidecode in case we did not check binaries (e.g. lynis show environment)
+ if [ ${CHECK_BINARIES} -eq 0 ]; then DMIDECODEBINARY=$(command -v dmidecode 2> /dev/null); fi
if [ -n "${DMIDECODEBINARY}" -a -x "${DMIDECODEBINARY}" -a ${PRIVILEGED} -eq 1 ]; then
LogText "Test: trying to guess virtualization with dmidecode"
FIND=$(${DMIDECODEBINARY} -s system-product-name | awk '{ print $1 }')