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:
authoralobodzinski <lobo@dzinski.net>2016-09-05 20:30:04 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-09-05 20:30:04 +0300
commit01c687eb55be18e38a4c6ccc995afa1ad1df788e (patch)
treedfb4ba9feb749badfffb64fe08c81cb3cbaae87f /include/tests_filesystems
parent7e919103ccc9f9b5833ca2dfe454934de95ee66c (diff)
FILE-6336: Fixed flawed logic: work correctly even if there is no swap at all (#272)
Diffstat (limited to 'include/tests_filesystems')
-rw-r--r--include/tests_filesystems4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/tests_filesystems b/include/tests_filesystems
index 2c23740f..9bca8c65 100644
--- a/include/tests_filesystems
+++ b/include/tests_filesystems
@@ -276,8 +276,8 @@
# Swap partitions should be mounted with 'sw' or 'swap'
LogText "Test: check swap partitions with incorrect mount options"
#FIND=`${AWKBINARY} '{ if ($3=="swap" && ($4!="sw" && $4!="swap" && $4!="defaults")) print $1 }' /etc/fstab`
- FIND=`${AWKBINARY} '{ if ($3=="swap" && ($4~/sw/ || $4=="defaults")) { print $1 }}' /etc/fstab`
- if [ ! "${FIND}" = "" ]; then
+ FIND=`${AWKBINARY} '{ if ($3=="swap" && ($4!~/sw/ && $4!="defaults")) { print $1 }}' /etc/fstab`
+ if [ "${FIND}" = "" ]; then
Display --indent 2 --text "- Testing swap partitions" --result "${STATUS_OK}" --color GREEN
LogText "Result: all swap partitions have correct options (sw or swap)"
else