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:
authorMichael Boelen <michael.boelen@cisofy.com>2020-10-20 14:38:08 +0300
committerGitHub <noreply@github.com>2020-10-20 14:38:08 +0300
commit92df49d08e605e27941397f8057a3dc00890f35a (patch)
treeb1f5885b29d7da819eea98822778b10a40a011ad /include/functions
parent85fab60fb6bb53c97d97647d03d2d5c7e6024e3d (diff)
parenta2e752a8db56032e38cc8c7b96830ceea90bf844 (diff)
Merge pull request #973 from igloonet/fix/functions-parse-nginx-abs-path
Support absolute paths in nginx includes and fix ls warning on empty directories
Diffstat (limited to 'include/functions')
-rw-r--r--include/functions3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/functions b/include/functions
index e0f75a64..8cd95aec 100644
--- a/include/functions
+++ b/include/functions
@@ -2305,7 +2305,8 @@
# Check for additional config files included as follows
# "include sites-enabled/*.conf"
elif [ $(echo ${VALUE} | grep -F -c "*.conf") -gt 0 ]; then
- for FOUND_CONF in $(ls ${CONFIG_FILE%nginx.conf}${VALUE%;*}); do
+ if [ "$(echo ${VALUE} | ${CUTBINARY} -c1)" != "/" ]; then VALUE=${CONFIG_FILE%nginx.conf}; fi
+ for FOUND_CONF in $(ls ${VALUE%;*} 2> /dev/null); do
FOUND=0
for CONF in ${NGINX_CONF_FILES}; do
if [ "${CONF}" = "${FOUND_CONF}" ]; then FOUND=1; LogText "Found this file already in our configuration files array, not adding to queue"; fi