Bug 794760 - sealert tracebacks when analyzing a non-existent file
Summary: sealert tracebacks when analyzing a non-existent file
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: setroubleshoot
Version: 5.8
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-17 14:49 UTC by Milos Malik
Modified: 2016-02-11 15:47 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-24 19:47:03 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Milos Malik 2012-02-17 14:49:59 UTC
Description of problem:


Version-Release number of selected component (if applicable):
setroubleshoot-plugins-2.0.4-2.el5
setroubleshoot-server-2.0.5-5.el5_8.1
setroubleshoot-2.0.5-5.el5_8.1

How reproducible:
always

Steps to Reproduce:
1. get a RHEL-5.8 machine
2. log into X session as common user
3. run "sealert -a /tmp/missing" (where /tmp/missing does not exist)


Actual results
==============
$ rm -f /tmp/missing
$ sealert -a /tmp/missing

Opps, sealert hit an error!

Traceback (most recent call last):
  File "/usr/bin/sealert", line 968, in ?
    do_analyze_logfile(logfile, html)
  File "/usr/bin/sealert", line 824, in do_analyze_logfile
    scanner.scan_file()
  File "/usr/bin/sealert", line 804, in scan_file
    self.analyzer.open()
  File "/usr/lib/python2.4/site-packages/setroubleshoot/analyze.py", line 549, in open
    log_avc.error('%s.open()', self.__class__.__name__, e.strerror)
  File "/usr/lib/python2.4/logging/__init__.py", line 999, in error
    apply(self._log, (ERROR, msg, args), kwargs)
  File "/usr/lib/python2.4/logging/__init__.py", line 1079, in _log
    self.handle(record)
  File "/usr/lib/python2.4/logging/__init__.py", line 1089, in handle
    self.callHandlers(record)
  File "/usr/lib/python2.4/logging/__init__.py", line 1126, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python2.4/logging/__init__.py", line 642, in handle
    self.emit(record)
  File "/usr/lib/python2.4/logging/handlers.py", line 663, in emit
    msg = self.format(record)
  File "/usr/lib/python2.4/logging/__init__.py", line 617, in format
    return fmt.format(record)
  File "/usr/lib/python2.4/logging/__init__.py", line 405, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.4/logging/__init__.py", line 276, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting


Expected results
================
* sealert prints an error message which explains that the file does not exist
* no traceback

Comment 1 RHEL Program Management 2012-06-12 01:32:54 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.


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