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:
authormboelen <michael@cisofy.com>2016-02-02 19:07:20 +0300
committermboelen <michael@cisofy.com>2016-02-02 19:07:20 +0300
commitac5c98d76cf426eb84a81d7431ff82a3eb018dad (patch)
treeb14bfdc0c37cecb1d2e52e0af1a7c60e52c1fa60
parent647b482c533c910c56d6178a29ffa36f4fe52bf8 (diff)
Show what profile is used when using --config
-rw-r--r--include/consts1
-rw-r--r--include/parameters6
-rwxr-xr-xlynis6
-rw-r--r--lynis.85
4 files changed, 16 insertions, 2 deletions
diff --git a/include/consts b/include/consts
index 5418f9af..ce4550c3 100644
--- a/include/consts
+++ b/include/consts
@@ -143,6 +143,7 @@ unset LANG
SHELL_IS_BUSYBOX=0
SHOW_PROGRAM_DETAILS=1
SHOW_REPORT=1
+ SHOW_SETTINGS_FILE=0
SKIPPED_TESTS_ROOTONLY=""
SSHKEYSCANBINARY=""
SSHKEYSCANFOUND=0
diff --git a/include/parameters b/include/parameters
index 58211849..30ae4e47 100644
--- a/include/parameters
+++ b/include/parameters
@@ -97,6 +97,10 @@
CHECK=1
;;
+ --config)
+ SHOW_SETTINGS_FILE=1
+ ;;
+
# Cronjob support
--cronjob | --cron)
CRONJOB=1;
@@ -114,7 +118,7 @@
# Display all available options with short alias
--dump-options | --dumpoptions)
OPTIONS="--auditor
- --check-all_(-c) --cronjob_(--cron)
+ --check-all_(-c) --config --cronjob_(--cron)
--debug
--help_(-h)
--info
diff --git a/lynis b/lynis
index 802de1bf..e0d48b75 100755
--- a/lynis
+++ b/lynis
@@ -289,6 +289,12 @@
ExitCustom 66
fi
+ if [ ${SHOW_SETTINGS_FILE} -eq 1 ]; then
+ echo "Settings file: ${PROFILE}"
+ echo ""; echo ""
+ ExitClean
+ fi
+
# Initialize and check profile file, auditor name, log file and report file
if [ ! -r ${PROFILE} ]; then echo "Fatal error: Can't open profile file (${PROFILE})"; exit 1; fi
if [ "${AUDITORNAME}" = "" ]; then AUDITORNAME="[Unknown]"; fi
diff --git a/lynis.8 b/lynis.8
index 742354a8..84bee866 100644
--- a/lynis.8
+++ b/lynis.8
@@ -1,4 +1,4 @@
-.TH Lynis 8 "10 September 2015" "1.19" "Unix System Administrator's Manual"
+.TH Lynis 8 "2 February 2016" "1.20" "Unix System Administrator's Manual"
.SH "NAME"
@@ -58,6 +58,9 @@ each test to stdout. Additional information will be saved into a log file
.IP
In case the outcome of a scan needs to be automated, use the report file.
.TP
+.B \-\-config
+Show which settings file or profile is being used, then quit.
+.TP
.B \-\-cronjob
Perform automatic scan with cron safe options (no colors, no questions, no
breaks).