Bug 617319

Summary: audit_data.py uses os.exists instead of os.path.exists
Product: Red Hat Enterprise Linux 6 Reporter: Severin Gehwolf <sgehwolf>
Component: setroubleshootAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0CC: mmalik, sgehwolf, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: setroubleshoot-2.2.91-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-10 21:37:06 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:
Bug Depends On:    
Bug Blocks: 552922    
Attachments:
Description Flags
Proposed fix none

Description Severin Gehwolf 2010-07-22 19:01:02 UTC
Created attachment 433777 [details]
Proposed fix

audit_data.py uses os.exists() instead of os.path.exists(). Results in

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'exists'

Attached patch should fix the problem.

Besides:
$ rpm -qf /usr/lib64/python2.6/site-packages/setroubleshoot/audit_data.py
setroubleshoot-server-2.2.89-2.el6.x86_64

This component is not available as component selection.

Comment 2 Daniel Walsh 2010-07-22 20:32:27 UTC
Fixed in setroubleshoot-2.2.91-1.el6.x86_64

Comment 3 Milos Malik 2010-08-04 06:47:01 UTC
I cannot find the build referred in comment#2 in brew. Dan, could you build it ? The latest version found in brew is setroubleshoot-2.2.89-2.el6 and this bug blocks the testing of bz#552922 .

Comment 4 Milos Malik 2010-08-04 06:54:14 UTC
# rpm -qf /usr/bin/sealert 
setroubleshoot-server-2.2.89-2.el6.i386
# LANG=te sealert -a /var/log/audit/audit.log 1>/dev/null
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/setroubleshoot/analyze.py", line 639, in task
    self.new_audit_record_handler(record_type, event_id, body_text, fields, line_number)
  File "/usr/lib/python2.6/site-packages/setroubleshoot/analyze.py", line 666, in new_audit_record_handler
    self.avc_event_handler(audit_event)
  File "/usr/lib/python2.6/site-packages/setroubleshoot/analyze.py", line 651, in avc_event_handler
    avc = AVC(audit_event)
  File "/usr/lib/python2.6/site-packages/setroubleshoot/audit_data.py", line 586, in __init__
    self.derive_avc_info_from_audit_event()
  File "/usr/lib/python2.6/site-packages/setroubleshoot/audit_data.py", line 839, in derive_avc_info_from_audit_event
    self._set_tpath()
  File "/usr/lib/python2.6/site-packages/setroubleshoot/audit_data.py", line 736, in _set_tpath
    if os.exists("/dev/"+dev):
AttributeError: 'module' object has no attribute 'exists'

sealert remains in this state until you kill it or press CTRL+C.

Comment 5 Daniel Walsh 2010-08-04 19:19:03 UTC
setroubleshoot-2.2.91-1.el6 is now built.

Comment 7 releng-rhel@redhat.com 2010-11-10 21:37:06 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.