Bug 617319 - audit_data.py uses os.exists instead of os.path.exists
Summary: audit_data.py uses os.exists instead of os.path.exists
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: setroubleshoot   
(Show other bugs)
Version: 6.0
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: Milos Malik
Depends On:
Blocks: 552922
TreeView+ depends on / blocked
Reported: 2010-07-22 19:01 UTC by Severin Gehwolf
Modified: 2015-09-14 15:24 UTC (History)
3 users (show)

Fixed In Version: setroubleshoot-2.2.91-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-10 21:37:06 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed fix (504 bytes, patch)
2010-07-22 19:01 UTC, Severin Gehwolf
no flags Details | Diff

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.

$ rpm -qf /usr/lib64/python2.6/site-packages/setroubleshoot/audit_data.py

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 
# 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
  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__
  File "/usr/lib/python2.6/site-packages/setroubleshoot/audit_data.py", line 839, in derive_avc_info_from_audit_event
  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.

Note You need to log in before you can comment on or make changes to this bug.