summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGE-LOG1
-rw-r--r--pts-core/functions/pts-functions-run.php18
2 files changed, 19 insertions, 0 deletions
diff --git a/CHANGE-LOG b/CHANGE-LOG
index 2e4f043..2799a27 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -5,6 +5,7 @@ Phoronix Test Suite (Git)
- pts-core: Improve RAM model/speed/type identification
- pts-core: Fix showing Phoronix Global URLs in browser (reported by Marox)
- pts-core: Add Tracker (trackerd) to $check_processes
+- pts-core: Add support for checking if SELinux is enabled/running
- pts: Switch tandem-xml test profile to using $PHP_BIN instead of calling php (thus allows it to run where PHP isn't part of their path, such as Solaris)
- pts: Switch pts-graph test profile to using $PHP_BIN instead of calling php (thus allows it to run where PHP isn't part of their path, such as Solaris)
- documentation: Bring all documentation up-to-date with Orkdal
diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php
index 9a4a7e2..358f1c9 100644
--- a/pts-core/functions/pts-functions-run.php
+++ b/pts-core/functions/pts-functions-run.php
@@ -194,6 +194,24 @@ function pts_generate_test_notes($test_type)
pts_add_test_note(pts_process_running_string($check_processes));
+ // Check if Security Enhanced Linux was enforcing, permissive, or disabled
+ if(is_file("/etc/sysconfig/selinux"))
+ {
+ $selinux_file = file_get_contents("/etc/sysconfig/selinux");
+ if(stripos($selinux_file, "selinux=disabled") === false)
+ {
+ pts_add_test_note("SELinux was enabled.");
+ }
+ }
+ else if(is_file("/boot/grub/menu.lst"))
+ {
+ $grub_file = file_get_contents("/boot/grub/menu.lst");
+ if(stripos($grub_file, "selinux=1") !== false)
+ {
+ pts_add_test_note("SELinux was enabled.");
+ }
+ }
+
// Power Saving Technologies?
pts_add_test_note(pts_processor_power_savings_enabled());
pts_add_test_note(system_power_mode());