mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-28 00:04:16 +02:00
Merge pull request #912 from konstruktoid/fileperms
accept more restrictive file permissions
This commit is contained in:
commit
e410d68ce6
@ -1286,7 +1286,7 @@
|
|||||||
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} is ${CHECK_PERMISSION}"
|
LogText "Test: checking if file ${CHECKFILE} has the permissions set to ${CHECK_PERMISSION} or more restrictive"
|
||||||
if [ -n "${STATBINARY}" ]; then
|
if [ -n "${STATBINARY}" ]; then
|
||||||
|
|
||||||
case ${OS} in
|
case ${OS} in
|
||||||
@ -1344,7 +1344,7 @@
|
|||||||
DATA=$(echo "${DATA}" | ${AWKBINARY} '{printf "%03d",$1}')
|
DATA=$(echo "${DATA}" | ${AWKBINARY} '{printf "%03d",$1}')
|
||||||
|
|
||||||
if [ -n "${DATA}" ]; then
|
if [ -n "${DATA}" ]; then
|
||||||
if [ "${DATA}" = "${CHECK_PERMISSION}" ]; then
|
if [ "${DATA}" -le "${CHECK_PERMISSION}" ]; then
|
||||||
LogText "Outcome: correct permissions (${DATA})"
|
LogText "Outcome: correct permissions (${DATA})"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user