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:
authorWarren <wes.p160@gmail.com>2019-03-14 14:34:17 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-03-14 14:34:17 +0300
commit0e8a12e2080b9044fcf7826250f4deadeccbc2bd (patch)
tree48c48b0a1bcb159c8d8c6bd4ccb1e65a5fa37d01
parent820666f448c10ac992e67ea5e140aa24e5b702ba (diff)
Quote WORKDIR directory existence in lynis (#653)
Quote both "${WORKDIR}/include" and "${WORKDIR}/db" directory existence check in if-statements to avoid "Fatal error: can't find directory" in case of a space-character in the ${WORKDIR} path.
-rwxr-xr-xlynis4
1 files changed, 2 insertions, 2 deletions
diff --git a/lynis b/lynis
index cc874a0c..cf0bfa98 100755
--- a/lynis
+++ b/lynis
@@ -76,7 +76,7 @@
tINCLUDE_TARGETS="/usr/local/include/lynis /usr/local/lynis/include /usr/share/lynis/include ./include" # Default paths to check (CWD as last option, in case we run from standalone)
for I in ${tINCLUDE_TARGETS}; do
if [ "${I}" = "./include" ]; then
- if [ -d ${WORKDIR}/include ]; then INCLUDEDIR="${WORKDIR}/include"; fi
+ if [ -d "${WORKDIR}/include" ]; then INCLUDEDIR="${WORKDIR}/include"; fi
elif [ -d ${I} -a -z "${INCLUDEDIR}" ]; then
INCLUDEDIR=${I}
fi
@@ -95,7 +95,7 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta
DBDIR=""; tDB_TARGETS="/usr/local/share/lynis/db /usr/local/lynis/db /usr/share/lynis/db ./db"
for I in ${tDB_TARGETS}; do
if [ "${I}" = "./db" ]; then
- if [ -d ${WORKDIR}/db ]; then DBDIR="${WORKDIR}/db"; fi
+ if [ -d "${WORKDIR}/db" ]; then DBDIR="${WORKDIR}/db"; fi
elif [ -d ${I} -a -z "${DBDIR}" ]; then
DBDIR="${I}"
fi