diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-05-02 16:36:31 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-05-02 16:36:31 +0300 |
commit | 3a4a18e472c5a0c95aed0578ece49ec817f54ed9 (patch) | |
tree | 13658012fd1b0d9df8b9a6f49d3254df363254fb /lynis | |
parent | d4f71e6d42483487852558d272f2c97837bd8f06 (diff) |
Determine if we warned user about weak file permissions
Diffstat (limited to 'lynis')
-rwxr-xr-x | lynis | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |