mirror of https://github.com/CISOfy/lynis.git
Do not scan symlinked binary directories
This commit is contained in:
parent
57f609a920
commit
3beae44e92
|
@ -40,8 +40,9 @@
|
|||
Display --indent 2 --text "- Checking system binaries..."
|
||||
logtext "Status: Starting binary scan..."
|
||||
for SCANDIR in ${BINPATHS}; do
|
||||
logtext "Test: Check if directory exists and is not a symlink"
|
||||
if [ -d ${SCANDIR} -a ! -L ${SCANDIR} ]; then
|
||||
logtext "Test: Checking binaries in directory ${SCANDIR}"
|
||||
if [ -d ${SCANDIR} ]; then
|
||||
Display --indent 4 --text "- Checking ${SCANDIR}... " --result FOUND --color GREEN
|
||||
SCANNEDPATHS="${SCANNEDPATHS}, ${SCANDIR}"
|
||||
logtext "Directory ${SCANDIR} exists. Starting directory scanning..."
|
||||
|
@ -145,7 +146,7 @@
|
|||
done
|
||||
else
|
||||
Display --indent 4 --text "- Checking ${SCANDIR}... " --result "NOT FOUND" --color WHITE
|
||||
logtext "Directory ${SCANDIR} does NOT exist."
|
||||
logtext "Directory ${SCANDIR} does NOT exist or is a symlink."
|
||||
fi
|
||||
logtextbreak
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue