Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2016-07-31 22:18:56 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-07-31 22:18:56 +0300
commit987453061524ab9a50cb74a1a40fd5c7073c2417 (patch)
tree5306a5a00fd0622bad42d719efd7e9155c6e82de
parent290252b764da17d3a1a382edaf50d9f4f0603c32 (diff)
Override reading of files when we are root
-rw-r--r--include/functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/functions b/include/functions
index 708bbd51..8ddb94c2 100644
--- a/include/functions
+++ b/include/functions
@@ -739,8 +739,8 @@
LogText "Result: file is not owned by current user ID (${MYID}), but UID ${FILEOWNER}"
fi
- # Check if we have the read bit
- if [ "${OTHERPERMS}" = "r" ]; then
+ # Check if we are root, or have the read bit
+ if [ "${MYID}" = "0" -o "${OTHERPERMS}" = "r" ]; then
CANREAD=1
return 0
LogText "Result: file ${sFILE} is readable (or directory accessible)."