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>2018-02-06 12:45:41 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2018-02-06 12:45:41 +0300
commitc53072e31e8086d2fd432475eceb5f15923bd53d (patch)
tree517f898667c42e13c98ec6b9acc6cb57ff422ff3
parenta5cbc127344d104c61323bf80ca8d5ca4aea4012 (diff)
Ensure a parent directory with binaries is scanned - issue #517 on GitHub
-rw-r--r--include/binaries3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/binaries b/include/binaries
index f737bb86..cfa2f5fd 100644
--- a/include/binaries
+++ b/include/binaries
@@ -77,7 +77,8 @@
fi
# Add a space to make sure we discover a related directory if it was already scanned
- FIND=$(echo ${BINARY_PATHS_FOUND} | grep ", ${SCANDIR}")
+ # The grep -v is to prevent a match /usr/bin in something like /usr/bin/core_perl
+ FIND=$(echo ${BINARY_PATHS_FOUND} | grep ", ${SCANDIR}" | grep -v ", ${SCANDIR}/")
if [ ! -z "${FIND}" ]; then
SKIPDIR=1; LogText "Result: Skipping this directory as it was already scanned"
fi