mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-26 23:34:25 +02:00
When PATH is defined, only locations from variable
This commit is contained in:
parent
76c3ea0edb
commit
bc88775d0e
@ -51,7 +51,7 @@
|
|||||||
# multiple times, the one first in PATH should be used.
|
# multiple times, the one first in PATH should be used.
|
||||||
if [ ! -z "${PATH}" ]; then
|
if [ ! -z "${PATH}" ]; then
|
||||||
PATH_REVERSED=$(echo ${PATH} | awk -F: '{ for (i=NF; i>1; i--) printf("%s ",$i); print $1; }')
|
PATH_REVERSED=$(echo ${PATH} | awk -F: '{ for (i=NF; i>1; i--) printf("%s ",$i); print $1; }')
|
||||||
BIN_PATHS=$(echo "${PATH_REVERSED} ${BIN_PATHS}" | tr ':' ' ')
|
BIN_PATHS=$(echo "${PATH_REVERSED}" | tr ':' ' ')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# First test available locations that may be suspicious or dangerous
|
# First test available locations that may be suspicious or dangerous
|
||||||
|
Loading…
x
Reference in New Issue
Block a user