Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2014-10-14 12:01:46 +0400
committermboelen <michael@cisofy.com>2014-10-14 12:01:46 +0400
commit1f032c767f83a4be6cb2d9c5e4c32214209a2a66 (patch)
treeeac35722f330cff9c07684c3e5907144173fbd8d
parentb31a6c4659e302c1fb38aa5c796309bab9b305fa (diff)
Directories will be skipped when searching for nginx log files
-rw-r--r--include/tests_webservers14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/tests_webservers b/include/tests_webservers
index df1086a4..ce74e24a 100644
--- a/include/tests_webservers
+++ b/include/tests_webservers
@@ -501,12 +501,12 @@
if [ ${NGINX_SSL_PROTOCOLS} -eq 1 ]; then
Display --indent 8 --text "- Protocols configured" --result "YES" --color GREEN
- FIND=`${GREPBINARY} "ssl_protocols" ${NGINX_CONF_LOCATION} | ${GREPBINARY} "SSLv[12]"`
- if [ "${FIND}" = "" ]; then
- Display --indent 10 --text "- Insecure protocols found" --result "NO" --color GREEN
- else
- Display --indent 10 --text "- Insecure protocols found" --result "YES" --color RED
- fi
+ FIND=`${GREPBINARY} "ssl_protocols" ${NGINX_CONF_LOCATION} | ${GREPBINARY} "SSLv[12]"`
+ if [ "${FIND}" = "" ]; then
+ Display --indent 10 --text "- Insecure protocols found" --result "NO" --color GREEN
+ else
+ Display --indent 10 --text "- Insecure protocols found" --result "YES" --color RED
+ fi
else
Display --indent 8 --text "- Protocols configured" --result "NO" --color RED
NGINX_SSL_SUGGESTION=1
@@ -667,7 +667,7 @@
logtext "Test: Checking ${I}"
if [ -d ${I} ]; then
logtext "Result: Directory ${I} exists, so will be used as search path"
- FIND=`find ${I} -exec grep access_log \{\} \; | grep -v "#" | awk '{ if($1=="access_log") { print $2 } }' | sed 's/;$//g' | sort | uniq`
+ FIND=`find ${I} -type f -exec grep access_log \{\} \; | grep -v "#" | awk '{ if($1=="access_log") { print $2 } }' | sed 's/;$//g' | sort | uniq`
if [ "${FIND}" = "" ]; then
logtext "Result: no log files found"
else