diff options
author | mboelen <michael@cisofy.com> | 2014-09-09 16:49:14 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-09-09 16:49:14 +0400 |
commit | 3beae44e9268920f73f742365bfb26be5e5f63be (patch) | |
tree | 25047055ca2411cf7cef68060e5b722db1c41d3c /include | |
parent | 57f609a92058c0202c87bbc0f81a5349e864040c (diff) |
Do not scan symlinked binary directories
Diffstat (limited to 'include')
-rw-r--r-- | include/binaries | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/binaries b/include/binaries index 07bd557c..a5d8ec45 100644 --- a/include/binaries +++ b/include/binaries @@ -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 |