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:
authormboelen <michael@cisofy.com>2014-09-02 16:00:36 +0400
committermboelen <michael@cisofy.com>2014-09-02 16:00:36 +0400
commit5d730bf9b0405c228174c2e4624bce5f67b10057 (patch)
tree8cb7fd710e1efceb158dadf66054bef3836439e7 /include
parentbee3d5297642ed04a8d38febe006a86e2e48b0bd (diff)
Allow swap partitions to have swap in 4th column
Diffstat (limited to 'include')
-rw-r--r--include/tests_filesystems10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/tests_filesystems b/include/tests_filesystems
index 1d77d8d9..77a5e847 100644
--- a/include/tests_filesystems
+++ b/include/tests_filesystems
@@ -210,17 +210,17 @@
if [ -f /etc/fstab ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no FILE-6336 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking swap mount options"
if [ ${SKIPTEST} -eq 0 ]; then
- # Swap partitions should be mounted with 'sw'
+ # Swap partitions should be mounted with 'sw' or 'swap'
logtext "Test: check swap partitions with incorrect mount options"
- FIND=`awk '{ if ($3=="swap" && $4 !~ "sw") print $1 }' /etc/fstab`
+ FIND=`awk '{ if ($3=="swap" && ($4!="sw" && $4!="swap")) print $1 }' /etc/fstab`
if [ "${FIND}" = "" ]; then
Display --indent 2 --text "- Testing swap partitions..." --result OK --color GREEN
- logtext "Result: all swap partitions have correct options (=sw)"
+ logtext "Result: all swap partitions have correct options (sw or swap)"
else
Display --indent 2 --text "- Testing swap partitions..." --result WARNING --color RED
logtext "Result: possible incorrect mount options used for mounting swap partition (${FIND})"
- ReportWarning ${TEST_NO} "L" "Possible incorrect mount options used for swap parition (${FIND})"
- ReportSuggestion ${TEST_NO} "Check your /etc/fstab file. Swap parition usually have 'sw' in the options field (4th)."
+ #ReportWarning ${TEST_NO} "L" "Possible incorrect mount options used for swap parition (${FIND})"
+ ReportSuggestion ${TEST_NO} "Check your /etc/fstab file. Swap partition usually have 'sw' or 'swap' in the options field (4th)."
fi
fi
#