mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 07:44:14 +02:00
Determine if we warned user about weak file permissions
This commit is contained in:
parent
d4f71e6d42
commit
3a4a18e472
8
lynis
8
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()
|
# 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"
|
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"
|
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
|
fi
|
||||||
printf "\n\n[ Press ENTER to continue, or CTRL+C to cancel ]"
|
printf "\n\n[ Press ENTER to continue, or CTRL+C to cancel ]"
|
||||||
|
WARN_ON_FILE_ISSUES_ASKED=1
|
||||||
read DUMMY
|
read DUMMY
|
||||||
fi
|
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
|
# Now include files if permissions are correct, or user decided to continue
|
||||||
. ${INCLUDEDIR}/consts
|
. ${INCLUDEDIR}/consts
|
||||||
. ${INCLUDEDIR}/functions
|
. ${INCLUDEDIR}/functions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user