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-06-30 19:27:31 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-06-30 19:27:31 +0300
commit5e4e44bdf3113b6978396f556beb4b4c21a05b78 (patch)
tree9013a1d2a778ddbf47e6336bfc4b8f22cbe7f933 /include/binaries
parent08e8e59197e76f177457b4e1850236224e605fa0 (diff)
Added check to ensure that common system tools are defined as extra safety measure
Diffstat (limited to 'include/binaries')
-rw-r--r--include/binaries22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/binaries b/include/binaries
index 89b29b07..33251431 100644
--- a/include/binaries
+++ b/include/binaries
@@ -269,6 +269,28 @@
LogText "Result: checking of binaries skipped in this mode"
fi
+ # Test if the basic system tools are defined. These will be used during the audit.
+ [ "${AWKBINARY:-}" ] || ExitFatal "awk binary not found"
+ [ "${CUTBINARY:-}" ] || ExitFatal "cut binary not found"
+ [ "${EGREPBINARY:-}" ] || ExitFatal "grep binary not found"
+ [ "${FINDBINARY:-}" ] || ExitFatal "find binary not found"
+ [ "${GREPBINARY:-}" ] || ExitFatal "grep binary not found"
+ [ "${HEADBINARY:-}" ] || ExitFatal "head binary not found"
+ [ "${LSBINARY:-}" ] || ExitFatal "ls binary not found"
+ [ "${PSBINARY:-}" ] || ExitFatal "ps binary not found"
+ [ "${SEDBINARY:-}" ] || ExitFatal "sed binary not found"
+ [ "${SORTBINARY:-}" ] || ExitFatal "sort binary not found"
+ [ "${TRBINARY:-}" ] || ExitFatal "tr binary not found"
+ [ "${UNIQBINARY:-}" ] || ExitFatal "uniq binary not found"
+ [ "${WCBINARY:-}" ] || ExitFatal "wc binary not found"
+
+ # Test a few other tools that we did not specifically define (yet)
+ TOOLS="xxd"
+ for T in ${TOOLS}; do
+ DATA=$(type ${T})
+ if [ $? -gt 0 ]; then ExitFatal "${T} binary not found"; fi
+ done
+
#
#================================================================================
# Lynis - Security Auditing and System Hardening for Linux and UNIX - https://cisofy.com