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

John Haxby john.haxby at oracle.com
Mon Jan 19 17:08:43 UTC 2015


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

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..9d6bb53 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 /", keep_stderr=False)
         if self.get_option('list'):
             self.add_cmd_output([
                 "semanage fcontext -l",
-- 
1.8.3.1




More information about the sos-devel mailing list