mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 15:54:09 +02:00
present expected permission value in octal
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
c105f97efe
commit
3bfff0ca62
@ -1320,9 +1320,8 @@
|
|||||||
CHECK_PERMISSION=$(echo "${CHECK_PERMISSION}" | ${AWKBINARY} '{printf "%03d",$1}')
|
CHECK_PERMISSION=$(echo "${CHECK_PERMISSION}" | ${AWKBINARY} '{printf "%03d",$1}')
|
||||||
|
|
||||||
# First try stat command
|
# 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
|
if [ -n "${STATBINARY}" ]; then
|
||||||
|
|
||||||
case ${OS} in
|
case ${OS} in
|
||||||
*BSD | "macOS")
|
*BSD | "macOS")
|
||||||
# BSD and macOS have no --format, only short notation
|
# BSD and macOS have no --format, only short notation
|
||||||
@ -1388,7 +1387,7 @@
|
|||||||
fi
|
fi
|
||||||
done
|
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
|
# No match, return exit code 1
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user