mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 15:54:09 +02:00
Use binary paths from both PATH and predefined list to improve detection on all platforms
This commit is contained in:
parent
ef2659acc8
commit
3a4bc4db9c
@ -43,8 +43,8 @@
|
||||
LogText "Status: Starting binary scan..."
|
||||
|
||||
# Test if our PATH variable provides a set of paths (otherwise we use predefined list in include/consts)
|
||||
if [ ! -z "${PATH}" ]; then BIN_PATHS=$(echo ${PATH} | tr ':' ' '); fi
|
||||
SORTED_BIN_PATHS=$(echo ${BIN_PATHS} | tr ' ' '\n' | sort | tr '\n' ' ')
|
||||
if [ ! -z "${PATH}" ]; then BIN_PATHS=$(echo "${BIN_PATHS} ${PATH}" | tr ':' ' '); fi
|
||||
SORTED_BIN_PATHS=$(echo ${BIN_PATHS} | tr ' ' '\n' | sort | uniq | tr '\n' ' ')
|
||||
for SCANDIR in ${SORTED_BIN_PATHS}; do
|
||||
LogText "Test: Checking binaries in directory ${SCANDIR}"
|
||||
ORGPATH=""
|
||||
|
@ -23,8 +23,8 @@
|
||||
#################################################################################
|
||||
#
|
||||
|
||||
# Paths where system and program binaries are located
|
||||
BIN_PATHS="/bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin \
|
||||
# Paths where system and program binaries are typically located
|
||||
BIN_PATHS="/bin /sbin /usr/bin /usr/gnu/bin /usr/sbin /usr/local/bin /usr/local/sbin \
|
||||
/usr/local/libexec /usr/libexec /usr/sfw/bin /usr/sfw/sbin \
|
||||
/usr/sfw/libexec /opt/sfw/bin /opt/sfw/sbin /opt/sfw/libexec \
|
||||
/usr/xpg4/bin /usr/css/bin /usr/ucb /usr/X11R6/bin /usr/X11R7/bin \
|
||||
|
Loading…
x
Reference in New Issue
Block a user