mirror of https://github.com/CISOfy/lynis.git
A250 2 (#398)
* fix missing ROOTDIR prefix * sort list of services before processing * sort list of certificates before processing * sort list of startup scripts before processing * spell check * remove possessive pronoun
This commit is contained in:
parent
360be2a700
commit
8d2b3a202f
|
@ -634,7 +634,7 @@
|
|||
if [ -d ${DIR} ]; then
|
||||
LogText "Result: directory ${DIR} found"
|
||||
LogText "Test: checking for available files in directory"
|
||||
FIND=$(${FINDBINARY} ${DIR} -type f -print)
|
||||
FIND=$(${FINDBINARY} ${DIR} -type f -print | ${SORTBINARY})
|
||||
if [ ! -z "${FIND}" ]; then
|
||||
LogText "Result: found files in directory, checking permissions now"
|
||||
for FILE in ${FIND}; do
|
||||
|
@ -658,7 +658,7 @@
|
|||
for NO in 0 1 2 3 4 5 6; do
|
||||
LogText "Test: Checking ${ROOTDIR}etc/rc${NO}.d scripts for writable bit"
|
||||
if [ -d ${ROOTDIR}etc/rc${NO}.d ]; then
|
||||
FIND=$(${FINDBINARY} ${ROOTDIR}etc/rc${NO}.d -type f -print)
|
||||
FIND=$(${FINDBINARY} ${ROOTDIR}etc/rc${NO}.d -type f -print | ${SORTBINARY})
|
||||
for I in ${FIND}; do
|
||||
if IsWorldWritable ${I}; then
|
||||
FOUND=1
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
if [ ${CANREAD} -eq 1 ]; then
|
||||
LogText "Result: found directory ${DIR}"
|
||||
# Search for CRT files
|
||||
sFINDCRTS=$(${FINDBINARY} ${DIR} -type f 2> /dev/null | ${EGREPBINARY} ".crt$|.pem$|^cert")
|
||||
sFINDCRTS=$(${FINDBINARY} ${DIR} -type f 2> /dev/null | ${EGREPBINARY} ".crt$|.pem$|^cert" | ${SORTBINARY})
|
||||
if [ ! -z "${sFINDCRTS}" ]; then
|
||||
for FILE in ${sFINDCRTS}; do
|
||||
FileIsReadable ${FILE}
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
BAD_FILE_PERMISSIONS=0
|
||||
BAD_FILE_OWNERSHIP=0
|
||||
FindCronJob() {
|
||||
sCRONJOBS=$(${EGREPBINARY} '^([0-9*])' $1 | ${TRBINARY} '\t' ' ' | ${TRBINARY} -s ' ' | ${TRBINARY} ' ' ',')
|
||||
sCRONJOBS=$(${EGREPBINARY} '^([0-9*])' $1 | ${TRBINARY} '\t' ' ' | ${TRBINARY} -s ' ' | ${TRBINARY} ' ' ',' | ${SORTBINARY})
|
||||
}
|
||||
|
||||
CRONTAB_FILE="${ROOTDIR}etc/crontab"
|
||||
|
@ -163,7 +163,7 @@
|
|||
if [ "${OS}" = "Linux" ]; then
|
||||
if [ -f /etc/anacrontab ]; then
|
||||
LogText "Test: checking anacrontab"
|
||||
sANACRONJOBS=$(${EGREPBINARY} '^([0-9@])' /etc/anacrontab | ${TRBINARY} '\t' ' ' | ${TRBINARY} -s ' ' | ${TRBINARY} ' ' ',')
|
||||
sANACRONJOBS=$(${EGREPBINARY} '^([0-9@])' /etc/anacrontab | ${TRBINARY} '\t' ' ' | ${TRBINARY} -s ' ' | ${TRBINARY} ' ' ',' | ${SORTBINARY})
|
||||
if [ ! -z "${sANACRONJOBS}" ]; then
|
||||
Report "scheduler[]=anacron"
|
||||
for I in ${sANACRONJOBS}; do
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
LogText "Result: No snmpd configuration found"
|
||||
Display --indent 4 --text "- Checking SNMP configuration" --result "${STATUS_NOT_FOUND}" --color WHITE
|
||||
else
|
||||
LogText "Restult: using last found configuration file: ${SNMP_DAEMON_CONFIG}"
|
||||
LogText "Result: using last found configuration file: ${SNMP_DAEMON_CONFIG}"
|
||||
Display --indent 4 --text "- Checking SNMP configuration" --result "${STATUS_FOUND}" --color GREEN
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
APACHE_MODULES_ENABLED_LOCS="${ROOTDIR}etc/apache2/mods-enabled"
|
||||
APACHE_MODULES_LOCS="${ROOTDIR}etc/httpd/modules ${ROOTDIR}opt/local/apache2/modules ${ROOTDIR}usr/lib/apache2 ${ROOTDIR}usr/lib/httpd/modules ${ROOTDIR}usr/libexec/apache2 ${ROOTDIR}usr/lib64/apache2 ${ROOTDIR}usr/lib64/apache2/modules ${ROOTDIR}usr/lib64/httpd/modules ${ROOTDIR}usr/local/libexec/apache ${ROOTDIR}usr/local/libexec/apache22"
|
||||
NGINX_RUNNING=0
|
||||
NGINX_CONF_LOCS="${ROOTDIR}etc/nginx ${ROOTDIR}usr/local/etc/nginx usr/local/nginx/conf"
|
||||
NGINX_CONF_LOCS="${ROOTDIR}etc/nginx ${ROOTDIR}usr/local/etc/nginx ${ROOTDIR}usr/local/nginx/conf"
|
||||
NGINX_CONF_LOCATION=""
|
||||
NGINX_CONF_FILES=""
|
||||
NGINX_CONF_FILES_ADDITIONS=""
|
||||
|
@ -561,7 +561,7 @@
|
|||
Display --indent 8 --text "- Debugging mode on error_log" --result "${STATUS_YES}" --color RED
|
||||
AddHP 2 3
|
||||
else
|
||||
LogText "Result: no virtual hosts found which have their their error log in debug mode"
|
||||
LogText "Result: no virtual hosts found which have their error log in debug mode"
|
||||
Display --indent 8 --text "- Debugging mode on error_log" --result "${STATUS_NO}" --color GREEN
|
||||
AddHP 3 3
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue