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
path: root/lynis
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2016-05-15 15:03:57 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-05-15 15:03:57 +0300
commit1cbf7244c29f92f4adf2ee9458b0eed487520c2d (patch)
tree501d46f36ac1f3e932457d9695c836ae14a37f43 /lynis
parent26c67e4ec677980b169b2056dff0e5315c2735d1 (diff)
Added detection and display of profile directory
Diffstat (limited to 'lynis')
-rwxr-xr-xlynis5
1 files changed, 4 insertions, 1 deletions
diff --git a/lynis b/lynis
index 8fc594b9..57bc6574 100755
--- a/lynis
+++ b/lynis
@@ -267,6 +267,7 @@ ${NORMAL}
if [ "${PROFILE}" = "" ]; then
CUSTOM_PROFILE=""
DEFAULT_PROFILE=""
+ PROFILEDIR=""
tPROFILE_NAMES="default.prf custom.prf"
tPROFILE_TARGETS="/usr/local/etc/lynis /etc/lynis /usr/local/lynis ."
for PNAME in ${tPROFILE_NAMES}; do
@@ -277,13 +278,15 @@ ${NORMAL}
elif [ "${PNAME}" = "custom.prf" -a ! "${CUSTOM_PROFILE}" = "" ]; then
Debug "Already discovered custom.prf - skipping this file (${PLOC}/${PNAME})"
else
- FILE="${PLOC}/${PNAME}"
+ if [ "${PLOC}" = "." ]; then FILE="${WORKDIR}/${PNAME}"; else FILE="${PLOC}/${PNAME}"; fi
if [ -r ${FILE} ]; then
PROFILES="${PROFILES} ${FILE}"
case ${PNAME} in
"custom.prf") CUSTOM_PROFILE="${FILE}" ;;
"default.prf") DEFAULT_PROFILE="${FILE}" ;;
esac
+ # Set profile directory to last match (Lynis could be both installed, and run as a separate download)
+ if [ "${PLOC}" = "." ]; then PROFILEDIR="${WORKDIR}"; else PROFILEDIR="${PLOC}"; fi
fi
fi
done