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>2019-07-18 12:42:26 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-07-18 12:42:26 +0300
commitb53b894f331fa4e005ee1c255471cd4070b0c11f (patch)
tree0cad2dbdba08445963d1f8d21fec7cbfeb046dae /include/parameters
parentb7f7179f1ef3287ab529537a4cc659349f007fef (diff)
Added file check when a profile is provided
Diffstat (limited to 'include/parameters')
-rw-r--r--include/parameters6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/parameters b/include/parameters
index 001044a5..98cd2e2d 100644
--- a/include/parameters
+++ b/include/parameters
@@ -315,7 +315,11 @@
--profile)
if [ $# -gt 1 ]; then
shift
- SEARCH_PROFILES=$1
+ if [ ! -r "$1" ]; then
+ echo "Fatal error: could not find or read the provided profile ($1)"
+ exit 1
+ fi
+ SEARCH_PROFILES="$1"
else
echo "Specify the profile (lynis audit system --profile /home/michael/myprofile.prf)"
exit 1