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-02 16:36:31 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-05-02 16:36:31 +0300
commit3a4a18e472c5a0c95aed0578ece49ec817f54ed9 (patch)
tree13658012fd1b0d9df8b9a6f49d3254df363254fb /lynis
parentd4f71e6d42483487852558d272f2c97837bd8f06 (diff)
Determine if we warned user about weak file permissions
Diffstat (limited to 'lynis')
-rwxr-xr-xlynis8
1 files changed, 7 insertions, 1 deletions
diff --git a/lynis b/lynis
index 0f3a4ace..d3cb4872 100755
--- a/lynis
+++ b/lynis
@@ -99,7 +99,8 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta
#################################################################################
#
# Perform a basic check for permissions. After including functions, using SafePerms()
- # Optimization: remove ls -l for owner and only do UID check, reducing one getpwent
+ WARN_ON_FILE_ISSUES=1
+ WARN_ON_FILE_ISSUES_ASKED=0
FILES_TO_CHECK="consts functions"
@@ -151,9 +152,14 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta
printf "\n Option 2) Change ownership of the related files (or full directory).\n\n Commands (full directory):\n # cd ..\n # chown -R 0:0 lynis\n # cd lynis\n # ./lynis audit system"
fi
printf "\n\n[ Press ENTER to continue, or CTRL+C to cancel ]"
+ WARN_ON_FILE_ISSUES_ASKED=1
read DUMMY
fi
+ if [ ${WARN_ON_FILE_ISSUES_ASKED} -eq 1 ]; then
+ WARN_ON_FILE_ISSUES=0
+ fi
+
# Now include files if permissions are correct, or user decided to continue
. ${INCLUDEDIR}/consts
. ${INCLUDEDIR}/functions