Bug 583739

Summary: sealert throws NameError exception
Product: [Fedora] Fedora Reporter: Göran Uddeborg <goeran>
Component: setroubleshootAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: setroubleshoot-2.2.74-1.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-22 18:31:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Göran Uddeborg 2010-04-19 15:43:09 UTC
Description of problem:
In order to check the status of bug 539286 in a Swedish locale, I upgraded to setroubleshoot from Fedora 13, and tried the command suggested in comment 2, bug 539286.  It counts percentages for a while, but then I get a traceback.  There is a complaint about a variable "avc" not being defined.

I want to mention that I have not completely upgraded to Fedora 13 packages.  I have upgraded setroubleshoot, and packages I thought could be related like libselinux, but there are older packages around.  So if this variable is meant to come from somewhere else in some way, the problem could be because of an inconsistent installation state.  Looking at the code I do get the impression of a programming error, but I don't want to rule out other explanations.

Version-Release number of selected component (if applicable):
setroubleshoot-2.2.72-1.fc13.x86_64
setroubleshoot-server-2.2.72-1.fc13.x86_64

How reproducible:
Every time, as long as there is any AVC:s to report.

Steps to Reproduce:
1.sealert -a /var/log/audit/audit.log
  
Actual results:
mimmi$ sudo sealert -a /var/log/audit/audit.log
 60% doneTraceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/analyze.py", line 635, in task
    self.new_audit_record_handler(record_type, event_id, body_text, fields, line_number)
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/analyze.py", line 661, in new_audit_record_handler
    self.avc_event_handler(audit_event)
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/analyze.py", line 647, in avc_event_handler
    avc = AVC(audit_event)
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/audit_data.py", line 586, in __init__
    self.derive_avc_info_from_audit_event()
  File "/usr/lib64/python2.6/site-packages/setroubleshoot/audit_data.py", line 895, in derive_avc_info_from_audit_event
    raise ValueError("Invalid AVC %s, it is allowed in current policy" %  avc)
NameError: global name 'avc' is not defined

Comment 1 Daniel Walsh 2010-04-20 12:27:19 UTC
Fixed in setroubleshoot-2.2.74-1.fc13

Comment 2 Fedora Update System 2010-04-20 12:28:27 UTC
setroubleshoot-2.2.74-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/setroubleshoot-2.2.74-1.fc13

Comment 3 Fedora Update System 2010-04-20 13:07:35 UTC
setroubleshoot-2.2.74-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update setroubleshoot'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/setroubleshoot-2.2.74-1.fc13

Comment 4 Göran Uddeborg 2010-04-22 18:31:19 UTC
Fixed, at least in 2.2.76.  (I didn't test .74 or .75.)

Comment 5 Fedora Update System 2010-04-22 22:55:03 UTC
setroubleshoot-2.2.74-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.