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
path: root/lynis
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2016-05-02 18:12:43 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-05-02 18:12:43 +0300
commitc806c59f77e4b77bb2c525e8097b0aaa55901369 (patch)
treed268b2acef38f36ac6d198e3c244c84b8538e10d /lynis
parentee4bd4cb263d97f53a299dfb01e4cd07ffce11a8 (diff)
Simplify checking of file permissions on tests_custom
Diffstat (limited to 'lynis')
-rwxr-xr-xlynis5
1 files changed, 1 insertions, 4 deletions
diff --git a/lynis b/lynis
index f39eb43f..e1c52931 100755
--- a/lynis
+++ b/lynis
@@ -889,12 +889,9 @@ ${NORMAL}
# Custom tests
if [ -f ${INCLUDEDIR}/tests_custom ]; then
LogText "Result: tests_custom file found in include directory"
- LogText "Test: checking file permissions of tests_custom file"
- FIND=`ls -l ${INCLUDEDIR}/tests_custom | cut -c 2-10`
- if [ "${FIND}" = "rw-r--r--" -o "${FIND}" = "rw-r-----" -o "${FIND}" = "rw-------" -o "${FIND}" = "r--------" ]; then
+ if SafePerms ${INCLUDEDIR}/tests_custom; then
Display --indent 2 --text "- Start custom tests... "
LogText "Result: file permissions fine, running custom tests"
- SafePerms ${INCLUDEDIR}/tests_custom
. ${INCLUDEDIR}/tests_custom
else
LogText "Exception: skipping custom tests, file has bad permissions (should be 640, 600 or 400)"