Bug 1484736

Summary: With selinuxfs unmounted, sealert produces a traceback
Product: [Fedora] Fedora Reporter: Milos Malik <mmalik>
Component: setroubleshootAssignee: Petr Lautrbach <plautrba>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 26CC: dwalsh, hartsjc, lvrabec, mgrepl, mmalik, plautrba, pmoore, vmojzis
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: setroubleshoot-3.3.12-3.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1420084 Environment:
Last Closed: 2017-09-28 23:55:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milos Malik 2017-08-24 09:01:19 UTC
+++ This bug was initially created as a clone of Bug #1420084 +++

Description of problem:
* with selinuxfs unmounted, sealert produces a traceback

Version-Release number of selected component (if applicable):
setroubleshoot-3.3.12-1.fc26.x86_64
setroubleshoot-plugins-3.3.7-1.fc26.noarch
setroubleshoot-server-3.3.12-1.fc26.x86_64

How reproducible:
* always

Steps to Reproduce:
# umount /sys/fs/selinux
# sealert -a /var/log/audit/audit.log
Opps, sealert hit an error!

ValueError: You must specify the -p option with the path to the policy file.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/sealert", line 695, in <module>
    do_analyze_logfile(logfile)
  File "/usr/bin/sealert", line 532, in do_analyze_logfile
    audit2why.init()
SystemError: <built-in function init> returned a result with an error set
#

Expected results:
* no tracebacks

Comment 1 Petr Lautrbach 2017-08-24 09:13:03 UTC
diff --git a/framework/src/sealert b/framework/src/sealert
index c8036f8..b7d5898 100755
--- a/framework/src/sealert
+++ b/framework/src/sealert
@@ -699,7 +699,7 @@ if __name__ == '__main__':
             except ProgramError as e:
                 print(e.strerror, file=sys.stderr)
                 sys.exit(3)
-            except ValueError as e:
+            except Exception as e:
                 print("SELinux is disabled or we can't open a policy file")
                 sys.exit(3)

Comment 2 Fedora Update System 2017-09-15 09:53:36 UTC
setroubleshoot-3.3.12-4.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-a3eb5dffa6

Comment 3 Fedora Update System 2017-09-15 10:44:03 UTC
setroubleshoot-3.3.12-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d82b89fe72

Comment 4 Fedora Update System 2017-09-15 10:59:53 UTC
setroubleshoot-3.3.12-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-be0959ff2c

Comment 5 Fedora Update System 2017-09-15 16:55:34 UTC
setroubleshoot-3.3.12-4.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a3eb5dffa6

Comment 6 Fedora Update System 2017-09-16 04:25:26 UTC
setroubleshoot-3.3.12-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d82b89fe72

Comment 7 Fedora Update System 2017-09-16 05:31:06 UTC
setroubleshoot-3.3.12-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-be0959ff2c

Comment 8 Fedora Update System 2017-09-19 07:17:45 UTC
setroubleshoot-3.3.12-5.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-a3eb5dffa6

Comment 9 Fedora Update System 2017-09-19 07:19:42 UTC
setroubleshoot-3.3.12-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-be0959ff2c

Comment 10 Fedora Update System 2017-09-19 07:22:04 UTC
setroubleshoot-3.3.12-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d82b89fe72

Comment 11 Fedora Update System 2017-09-19 23:28:26 UTC
setroubleshoot-3.3.12-5.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a3eb5dffa6

Comment 12 Fedora Update System 2017-09-20 00:22:53 UTC
setroubleshoot-3.3.12-3.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d82b89fe72

Comment 13 Fedora Update System 2017-09-20 01:21:24 UTC
setroubleshoot-3.3.12-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-be0959ff2c

Comment 14 Fedora Update System 2017-09-28 19:56:58 UTC
setroubleshoot-3.3.12-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2017-09-28 23:55:04 UTC
setroubleshoot-3.3.12-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2017-09-30 06:34:20 UTC
setroubleshoot-3.3.12-5.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.