mirror of https://github.com/CISOfy/lynis.git
Combined sort and uniq to sort -u
This commit is contained in:
parent
0a6417423f
commit
9605f0fa80
|
@ -36,10 +36,10 @@
|
|||
FOUNDPROBLEM=0
|
||||
SKIP=0
|
||||
sSSL_PATHS=$(echo ${SSL_CERTIFICATE_PATHS} | ${SEDBINARY} 's/:space:/__space__/g' | ${SEDBINARY} 's/:/ /g')
|
||||
sSSL_PATHS=$(echo ${sSSL_PATHS} | ${SEDBINARY} 's/^ //' | ${SORTBINARY} | ${UNIQBINARY})
|
||||
sSSL_PATHS=$(echo ${sSSL_PATHS} | ${SEDBINARY} 's/^ //' | ${SORTBINARY} -u)
|
||||
LogText "Paths to scan: ${sSSL_PATHS}"
|
||||
|
||||
IGNORE_PATHS_PRINT=$(echo ${SSL_CERTIFICATE_PATHS_TO_IGNORE} | ${SEDBINARY} 's/:/, /g' | ${SEDBINARY} 's/__space__/ /g' | ${SEDBINARY} 's/^ //' | ${SORTBINARY} | ${UNIQBINARY})
|
||||
IGNORE_PATHS_PRINT=$(echo ${SSL_CERTIFICATE_PATHS_TO_IGNORE} | ${SEDBINARY} 's/:/, /g' | ${SEDBINARY} 's/__space__/ /g' | ${SEDBINARY} 's/^ //' | ${SORTBINARY} -u)
|
||||
LogText "Paths to ignore: ${IGNORE_PATHS_PRINT}"
|
||||
|
||||
for DIR in ${sSSL_PATHS}; do
|
||||
|
|
|
@ -297,7 +297,7 @@
|
|||
fi
|
||||
done
|
||||
# Sort the list of discovered configuration files so we can make them unique
|
||||
REDIS_CONFIGURATION_FILES=$(echo ${REDIS_CONFIGURATION_FILES} | ${SEDBINARY} 's/^ //' | ${TRBINARY} ' ' '\n' | ${SORTBINARY} | ${UNIQBINARY} | ${TRBINARY} '\n' ' ')
|
||||
REDIS_CONFIGURATION_FILES=$(echo ${REDIS_CONFIGURATION_FILES} | ${SEDBINARY} 's/^ //' | ${TRBINARY} ' ' '\n' | ${SORTBINARY} -u | ${TRBINARY} '\n' ' ')
|
||||
for FILE in ${REDIS_CONFIGURATION_FILES}; do
|
||||
if IsWorldReadable ${FILE}; then
|
||||
LogText "Result: configuration file ${FILE} is world readable, this might leak sensitive information!"
|
||||
|
|
Loading…
Reference in New Issue