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-15 14:01:09 +0400
committermboelen <michael@cisofy.com>2014-09-15 14:01:09 +0400
commitc9fde8c2d11744cc0875bc3e5dd0abf096211755 (patch)
tree0997d08919db7ec4e2aa9065c3e9aaf1671c4d6f /include/tests_storage_nfs
parent35d32fb5e40b86632677fd2256aebeddf926394a (diff)
Code cleanup and small enhancements
Diffstat (limited to 'include/tests_storage_nfs')
-rw-r--r--include/tests_storage_nfs25
1 files changed, 12 insertions, 13 deletions
diff --git a/include/tests_storage_nfs b/include/tests_storage_nfs
index defdf679..6526dba6 100644
--- a/include/tests_storage_nfs
+++ b/include/tests_storage_nfs
@@ -27,10 +27,9 @@
#
#################################################################################
#
-
# Test : STRG-1902
# Description : Check rpcinfo
- if [ ! "${RPCINFOBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
+ if [ ! "${RPCINFOBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no STRG-1902 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check rpcinfo registered programs"
if [ ${SKIPTEST} -eq 0 ]; then
logtext "Test: Checking rpcinfo registered programs"
@@ -38,14 +37,14 @@
for I in ${FIND}; do
logtext "rpcinfo: ${I}"
done
- Display --indent 2 --text "- Query rpc registered programs..." --result "DONE" --color GREEN
+ Display --indent 2 --text "- Query rpc registered programs" --result "DONE" --color GREEN
fi
#
#################################################################################
#
# Test : STRG-1904
# Description : Check nfs versions in rpcinfo
- if [ ! "${RPCINFOBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
+ if [ ! "${RPCINFOBINARY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no STRG-1904 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check nfs rpc"
if [ ${SKIPTEST} -eq 0 ]; then
logtext "Test: Checking NFS registered versions"
@@ -53,7 +52,7 @@
for I in ${FIND}; do
logtext "Found version: ${I}"
done
- Display --indent 2 --text "- Query NFS versions..." --result "DONE" --color GREEN
+ Display --indent 2 --text "- Query NFS versions" --result "DONE" --color GREEN
fi
#
#################################################################################
@@ -81,7 +80,7 @@
if [ "${FIND}" = "" ]; then
logtext "Output: no NFS port number found"
fi
- Display --indent 2 --text "- Query NFS protocols..." --result "DONE" --color GREEN
+ Display --indent 2 --text "- Query NFS protocols" --result "DONE" --color GREEN
fi
#
#################################################################################
@@ -94,10 +93,10 @@
FIND=`${PSBINARY} ax | grep "nfsd" | grep -v "grep"`
if [ "${FIND}" = "" ]; then
logtext "Output: NFS daemon is not running"
- Display --indent 2 --text "- Check running NFS daemon..." --result "NOT FOUND" --color WHITE
+ Display --indent 2 --text "- Check running NFS daemon" --result "NOT FOUND" --color WHITE
else
logtext "Output: NFS daemon is running"
- Display --indent 2 --text "- Check running NFS daemon.." --result "FOUND" --color GREEN
+ Display --indent 2 --text "- Check running NFS daemon" --result "FOUND" --color GREEN
NFS_DAEMON_RUNNING=1
fi
fi
@@ -129,10 +128,10 @@
logtext "Result: /etc/exports does not contain exported file systems"
NFS_EXPORTS_EMPTY=1
fi
- Display --indent 4 --text "- Checking /etc/exports..." --result "FOUND" --color GREEN
+ Display --indent 4 --text "- Checking /etc/exports" --result "FOUND" --color GREEN
else
logtext "Result: file /etc/exports does not exist"
- Display --indent 4 --text "- Checking /etc/exports..." --result "NOT FOUND" --color WHITE
+ Display --indent 4 --text "- Checking /etc/exports" --result "NOT FOUND" --color WHITE
fi
fi
#
@@ -144,7 +143,7 @@
Register --test-no STRG-1928 --preqs-met ${PREQS_MET} --weight L --network NO --description "Checking empty /etc/exports"
if [ ${SKIPTEST} -eq 0 ]; then
if [ ${NFS_EXPORTS_EMPTY} -eq 1 ]; then
- Display --indent 6 --text "- Checking empty /etc/exports..." --result SUGGESTION --color YELLOW
+ Display --indent 6 --text "- Checking empty /etc/exports" --result SUGGESTION --color YELLOW
logtext "Result: /etc/exports seems to have no exported file systems"
ReportSuggestion ${TEST_NO} "/etc/exports has no exported file systems, while NFS daemon is running. Check if NFS needs to run on this system"
fi
@@ -161,12 +160,12 @@
sFIND=`${SHOWMOUNTBINARY} -e | awk '{ print $2 }' | sed '1d'| grep "\*"`
if [ "${sFIND}" != "" ]; then
logtext "Result: all client are allowed to access a NFS share in /etc/exports"
- Display --indent 4 --text "- Checking NFS client access..." --result "ALL CLIENTS" --color YELLOW
+ Display --indent 4 --text "- Checking NFS client access" --result "ALL CLIENTS" --color YELLOW
ReportSuggestion ${TEST_NO} "Specify clients that are allowed to access a NFS share /etc/exports"
AddHP 2 3
else
logtext "Result: only some clients are allowed to access a NFS share"
- Display --indent 4 --text "- Checking NFS client access..." --result OK --color GREEN
+ Display --indent 4 --text "- Checking NFS client access" --result OK --color GREEN
AddHP 3 3
fi
fi