diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-07 15:49:01 -0500 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-07 15:49:01 -0500 |
commit | cae0239236894722d123926eaa311c2852e0bb0a (patch) | |
tree | ffc5195d18ca40bdc67ad82258a14e96ecddb917 /pts-core/functions/pts-functions-run.php | |
parent | d27527137e604c32f2b406de33da32631685007f (diff) | |
download | phoronix-test-suite-upstream-cae0239236894722d123926eaa311c2852e0bb0a.tar.gz phoronix-test-suite-upstream-cae0239236894722d123926eaa311c2852e0bb0a.tar.xz phoronix-test-suite-upstream-cae0239236894722d123926eaa311c2852e0bb0a.zip |
pts-core: Fix read warnings in SELinux detection
Diffstat (limited to 'pts-core/functions/pts-functions-run.php')
-rw-r--r-- | pts-core/functions/pts-functions-run.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php index c4dbf91..103ea41 100644 --- a/pts-core/functions/pts-functions-run.php +++ b/pts-core/functions/pts-functions-run.php @@ -194,7 +194,7 @@ 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")) + if(is_file("/etc/sysconfig/selinux") && is_readable("/boot/grub/menu.lst")) { $selinux_file = file_get_contents("/etc/sysconfig/selinux"); if(stripos($selinux_file, "selinux=disabled") === false) @@ -202,7 +202,7 @@ function pts_generate_test_notes($test_type) pts_add_test_note("SELinux was enabled."); } } - else if(is_file("/boot/grub/menu.lst")) + else if(is_file("/boot/grub/menu.lst") && is_readable("/boot/grub/menu.lst")) { $grub_file = file_get_contents("/boot/grub/menu.lst"); if(stripos($grub_file, "selinux=1") !== false) |