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:
authorRutger van Sleen <git@djslash.org>2016-08-30 21:03:38 +0300
committerGitHub <noreply@github.com>2016-08-30 21:03:38 +0300
commit67b1abedfa90603676081ab46c9d5b127c5713f5 (patch)
treeb0b99b4115ae2b624c9b496eebe93147690b7ef2 /include/tests_webservers
parent4e139f4d71e6ea562914de13f5dd8f599b5b811a (diff)
Fix sed syntax for ServerAlias removal
When a Apache config directive is in use, it has whitespace(s) or nothing at all prepended. Assuming that it always has a space before it doesn't have to match.
Diffstat (limited to 'include/tests_webservers')
-rw-r--r--include/tests_webservers2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tests_webservers b/include/tests_webservers
index 72972bf9..909b8a93 100644
--- a/include/tests_webservers
+++ b/include/tests_webservers
@@ -156,7 +156,7 @@
fi
done
# Search Server aliases
- for J in `${GREPBINARY} "ServerAlias" ${I} | ${GREPBINARY} -v "^#" | sed "s/.* ServerAlias//g" | sed "s/#.*//g"`; do
+ for J in `${GREPBINARY} "ServerAlias" ${I} | ${GREPBINARY} -v "^#" | sed "s/\s*ServerAlias //g" | sed "s/#.*//g"`; do
if [ ! -z ${J} ]; then
tVHOSTS="${tVHOSTS} ${J}"
cVHOSTS=$((cVHOSTS + 1))