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>2017-01-27 16:36:55 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2017-01-27 16:36:55 +0300
commit670b18b6f5f8ee7de6bcf5041d578ddcea5cf9f1 (patch)
treec3029f507c8ca7c4d19e5c0dbd0a7c78d8ef1a81
parent6fdc46cae53446c095fa367b7cfc1baefcce9321 (diff)
Strip out any comments at end of nginx configuration lines
-rw-r--r--include/functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/functions b/include/functions
index 16a65b29..321e2b2d 100644
--- a/include/functions
+++ b/include/functions
@@ -1636,7 +1636,7 @@
FIND=$(cat ${TMP_NGINX_FILE} | sed 's/ /:space:/g')
DEPTH=0
for I in ${FIND}; do
- I=`echo ${I} | sed 's/:space:/ /g' | sed 's/;$//'`
+ I=`echo ${I} | sed 's/:space:/ /g' | sed 's/;$//' | sed 's/ #.*$//'`
OPTION=`echo ${I} | awk '{ print $1 }'`
VALUE=`echo ${I}| cut -d' ' -f2-`
LogText "Result: found option ${OPTION} in ${CONFIG_FILE} with value '${VALUE}'"