mirror of
https://github.com/CISOfy/lynis.git
synced 2025-04-08 17:15:25 +02:00
Merge pull request #1226 from konstruktoid/1220
Extend HasCorrectCheckPermissions logging
This commit is contained in:
commit
e0b5dcf7d4
@ -1325,9 +1325,8 @@
|
||||
CHECK_PERMISSION=$(echo "${CHECK_PERMISSION}" | ${AWKBINARY} '{printf "%03d",$1}')
|
||||
|
||||
# First try stat command
|
||||
LogText "Test: checking if file ${CHECKFILE} has the permissions set to ${CHECK_PERMISSION} or more restrictive"
|
||||
LogText "Test: checking if file ${CHECKFILE} has the permissions set to ${CHECK_PERMISSION} (${CHECKPERMISSION_FULL}) or more restrictive"
|
||||
if [ -n "${STATBINARY}" ]; then
|
||||
|
||||
case ${OS} in
|
||||
*BSD | "macOS")
|
||||
# BSD and macOS have no --format, only short notation
|
||||
@ -1393,7 +1392,7 @@
|
||||
fi
|
||||
done
|
||||
|
||||
LogText "Outcome: permissions of file ${CHECKFILE} are not matching expected value (${DATA} != ${CHECKPERMISSION_FULL})"
|
||||
LogText "Outcome: permissions of file ${CHECKFILE} are not matching expected value (${DATA} != ${CHECK_PERMISSION})"
|
||||
# No match, return exit code 1
|
||||
return 1
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user