diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-10-28 13:53:34 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-10-28 13:53:34 -0400 |
commit | 2cfc60b975075f5c4a46e80ed26daeb9256f907b (patch) | |
tree | 2e437f46b51e1896fd3055e5654309cb029d4e22 | |
parent | 2fc63d8c13c29490b56a97cb68a92099a2eaeee3 (diff) | |
download | phoronix-test-suite-upstream-2cfc60b975075f5c4a46e80ed26daeb9256f907b.tar.gz phoronix-test-suite-upstream-2cfc60b975075f5c4a46e80ed26daeb9256f907b.tar.xz phoronix-test-suite-upstream-2cfc60b975075f5c4a46e80ed26daeb9256f907b.zip |
pts-core: Add support for checking if SELinux is enabled/running
-rw-r--r-- | CHANGE-LOG | 1 | ||||
-rw-r--r-- | pts-core/functions/pts-functions-run.php | 18 |
2 files changed, 19 insertions, 0 deletions
@@ -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()); |