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:
authorKepi <kepi@igloonet.cz>2020-07-02 23:14:38 +0300
committerKepi <kepi@igloonet.cz>2020-07-07 16:37:56 +0300
commitde18ddc2c01b2d53a21d48c8497a7a08a7386bf0 (patch)
tree0b41aa9f55a6cc31baa87df9e30f9a420b292a6c /include/functions
parent6355360972136ee8eb9d8781f8732fee2812d441 (diff)
[functions] ParseNginx: Support include on absolute paths
Includes can be absolute paths too. This is quick fix counting on fact that absolute paths have slash at start.
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 4ff5b43a..39ae7c92 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%;*}); 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