Bug 617319 - audit_data.py uses os.exists instead of os.path.exists
audit_data.py uses os.exists instead of os.path.exists
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: setroubleshoot (Show other bugs)
6.0
x86_64 Linux
high Severity medium
: rc
: ---
Assigned To: Daniel Walsh
Milos Malik
:
Depends On:
Blocks: 552922
  Show dependency treegraph
 
Reported: 2010-07-22 15:01 EDT by Severin Gehwolf
Modified: 2015-09-14 11:24 EDT (History)
3 users (show)

See Also:
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 16:37:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 15:01 EDT, Severin Gehwolf
no flags Details | Diff

  None (edit)
Description Severin Gehwolf 2010-07-22 15:01:02 EDT
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 16:32:27 EDT
Fixed in setroubleshoot-2.2.91-1.el6.x86_64
Comment 3 Milos Malik 2010-08-04 02:47:01 EDT
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 02:54:14 EDT
# 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 15:19:03 EDT
setroubleshoot-2.2.91-1.el6 is now built.
Comment 7 releng-rhel@redhat.com 2010-11-10 16:37:06 EST
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.