Do not scan symlinked binary directories

This commit is contained in:
mboelen 2014-09-09 14:49:14 +02:00
parent 57f609a920
commit 3beae44e92
1 changed files with 4 additions and 3 deletions

View File

@ -40,8 +40,9 @@
Display --indent 2 --text "- Checking system binaries..."
logtext "Status: Starting binary scan..."
for SCANDIR in ${BINPATHS}; do
logtext "Test: Checking binaries in directory ${SCANDIR}"
if [ -d ${SCANDIR} ]; then
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}"
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