aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/__init__.py2
-rw-r--r--sos/plugins/selinux.py13
-rw-r--r--sos/policies/__init__.py1
-rw-r--r--sos/policies/redhat.py1
4 files changed, 13 insertions, 4 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index 70711a3e..e25f0359 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -543,7 +543,7 @@ class Plugin(object):
# pylint: disable-msg = W0612
status, shout, runtime = sos_get_command_output(exe, timeout=timeout)
if (status == 127):
- self.soslog.info("could not run '%s': command not found" % exe)
+ self.soslog.debug("could not run '%s': command not found" % exe)
return None
if suggest_filename:
diff --git a/sos/plugins/selinux.py b/sos/plugins/selinux.py
index 699e5ff6..b7deae5a 100644
--- a/sos/plugins/selinux.py
+++ b/sos/plugins/selinux.py
@@ -20,16 +20,23 @@ class SELinux(Plugin, RedHatPlugin):
plugin_name = 'selinux'
- option_list = [("fixfiles", 'Print incorrect file context labels', 'slow', False)]
+ option_list = [("fixfiles", 'Print incorrect file context labels', 'slow', False),
+ ("list", 'List objects and their context', 'slow', False)]
packages = ('libselinux',)
def setup(self):
# sestatus is always collected in check_enabled()
self.add_copy_spec("/etc/selinux")
- if self.get_option('fixfiles'):
- self.add_cmd_output("fixfiles -v check")
self.add_cmd_output("sestatus -b")
+ self.add_cmd_output("semodule -l")
self.add_cmd_output("selinuxdefcon root")
self.add_cmd_output("selinuxconlist root")
self.add_cmd_output("selinuxexeccon /bin/passwd")
+ if self.get_option('fixfiles'):
+ self.add_cmd_output("fixfiles -v check")
+ if self.get_option('list'):
+ self.add_cmd_output("semanage fcontext -l")
+ self.add_cmd_output("semanage user -l")
+ self.add_cmd_output("semanage login -l")
+ self.add_cmd_output("semanage port -l")
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
index 8eff9935..96d1acae 100644
--- a/sos/policies/__init__.py
+++ b/sos/policies/__init__.py
@@ -190,6 +190,7 @@ No changes will be made to system configuration.
def get_tmp_dir(self, opt_tmp_dir):
if not opt_tmp_dir:
return tempfile.gettempdir()
+ return opt_tmp_dir
def validatePlugin(self, plugin_class):
"""
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
index c3740dce..93218157 100644
--- a/sos/policies/redhat.py
+++ b/sos/policies/redhat.py
@@ -85,6 +85,7 @@ class RedHatPolicy(LinuxPolicy):
def get_tmp_dir(self, opt_tmp_dir):
if not opt_tmp_dir:
return self._tmp_dir
+ return opt_tmp_dir
def get_local_name(self):
return self.host_name()