Determine if we warned user about weak file permissions

This commit is contained in:
Michael Boelen 2016-05-02 15:36:31 +02:00
parent d4f71e6d42
commit 3a4a18e472
1 changed files with 7 additions and 1 deletions

8
lynis
View File

@ -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