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:
authorZach Crownover <zachary.crownover@gmail.com>2016-11-19 15:39:57 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-11-19 15:39:57 +0300
commit659d3e42c5dcc6a60dff5f1e2301064132d98c45 (patch)
treea7f30b0e5654ca25c99cd722ec549fc6c06a3979 /include/tests_kernel
parent483a45e50684ae80edc278f685ea28a390a2047f (diff)
Improve DragonFly support (#329)
* Update facter location for BSDs BSDs tend to place third party binaries in /usr/local rather than /usr * Add support for DragonFly boot loader detection DragonFly BSD has the same file paths for the bootloader as FreeBSD * Add kernel module checking for DragonFly DragonFly BSD checks kernel modules the same way as FreeBSD * Add DragonFly check for login shells DragonFly's login files are the same as FreeBSD's * Add HAMMER PFS Detection All PFS mounts in HAMMER systems for DragonFly will be detected now
Diffstat (limited to 'include/tests_kernel')
-rw-r--r--include/tests_kernel31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/tests_kernel b/include/tests_kernel
index 61bfed61..b1ed421f 100644
--- a/include/tests_kernel
+++ b/include/tests_kernel
@@ -314,6 +314,37 @@
#
#################################################################################
#
+ # Test : KRNL-5831
+ # Description : Checking DragonFly loaded kernel modules
+ Register --test-no KRNL-5831 --os DragonFly --weight L --network NO --category security --description "Checking DragonFly loaded kernel modules"
+ if [ ${SKIPTEST} -eq 0 ]; then
+ Display --indent 2 --text "- Checking active kernel modules"
+ LogText "Test: Active kernel modules (KLDs)"
+ LogText "Description: View all active kernel modules (including kernel)"
+ LogText "Test: Checking modules"
+ if [ -f /sbin/kldstat ]; then
+ FIND=`kldstat | ${GREPBINARY} -v 'Name' | ${TRBINARY} -s ' ' | ${CUTBINARY} -d ' ' -f6`
+ if [ $? -eq 0 ]; then
+ LogText "Loaded modules according kldstat:"
+ N=0
+ for I in ${FIND}; do
+ LogText "Loaded module: ${I}"
+ Report "loaded_kernel_module[]=${I}"
+ N=$((N + 1))
+ done
+ Display --indent 4 --text "Found ${N} kernel modules" --result "${STATUS_DONE}" --color GREEN
+ else
+ Display --indent 4 --text "Test failed" --result "${STATUS_WARNING}" --color RED
+ LogText "Result: Problem with executing kldstat"
+ fi
+ else
+ echo "[ ${WHITE}SKIPPED${NORMAL} ]"
+ LogText "Result: no results, can't find /sbin/kldstat"
+ fi
+ fi
+#
+#################################################################################
+#
# Test : KRNL-5770
# Description : Checking Solaris load modules
Register --test-no KRNL-5770 --os Solaris --weight L --network NO --category security --description "Checking active kernel modules"