[sos-devel] [PATCH] plugins/selinux: fixfiles produces no useful output, use restorecon

John Haxby john.haxby at oracle.com
Tue Jan 13 14:22:23 UTC 2015


Also discard stderr for restorecon since that just reports files
that have no default context which is almost certainly not useful.

Signed-off-by: John Haxby <john.haxby at oracle.com>
---
 sos/plugins/selinux.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sos/plugins/selinux.py b/sos/plugins/selinux.py
index c914a9b..117ea06 100644
--- a/sos/plugins/selinux.py
+++ b/sos/plugins/selinux.py
@@ -39,7 +39,7 @@ class SELinux(Plugin, RedHatPlugin):
             "ps axuZww"
         ])
         if self.get_option('fixfiles'):
-            self.add_cmd_output("fixfiles -v check")
+            self.add_cmd_output("restorecon -Rvn / 2>/dev/null")
         if self.get_option('list'):
             self.add_cmd_output([
                 "semanage fcontext -l",
-- 
1.8.3.1




More information about the sos-devel mailing list