Bug 469980

Summary: "sealert -a /var/log/audit/audit.log" traceback when run as a non-root user
Product: [Fedora] Fedora Reporter: Murray McAllister <mmcallis>
Component: setroubleshootAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 10CC: dwalsh, jdennis, mgrepl, vdanen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-18 13:08:18 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 Murray McAllister 2008-11-05 00:24:58 UTC
Description of problem:
Running "sealert -a /var/log/audit/audit.log" as a non-root user causes a traceback.

Version-Release number of selected component (if applicable):
setroubleshoot-server-2.0.12-1.fc10.noarch
setroubleshoot-plugins-2.0.10-1.fc10.noarch
setroubleshoot-server-2.0.12-1.fc10.noarch

How reproducible:
Always

Steps to Reproduce:
1. run "sealert -a /var/log/audit/audit.log" as a non-root user.
  
Actual results:
Terminal (ssh):

Traceback (most recent call last):
  File "/usr/bin/sealert", line 990, in <module>
    from setroubleshoot.gui_utils import *
  File "/usr/lib/python2.5/site-packages/setroubleshoot/gui_utils.py", line 26, in <module>
    import gtk
  File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 79, in <module>
    _init()
  File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 67, in _init
    _gtk.init_check()
RuntimeError: could not open display

Terminal in GNOME:

Opps, sealert hit an error!

Traceback (most recent call last):
  File "/usr/bin/sealert", line 976, in <module>
    do_analyze_logfile(logfile, html)
  File "/usr/bin/sealert", line 832, in do_analyze_logfile
    scanner.scan_file()
  File "/usr/bin/sealert", line 812, in scan_file
    self.analyzer.open()
  File "/usr/lib/python2.5/site-packages/setroubleshoot/analyze.py", line 560, in open
    log_avc.error('%s.open()', self.__class__.__name__, e.strerror)
  File "/usr/lib/python2.5/logging/__init__.py", line 1015, in error
    apply(self._log, (ERROR, msg, args), kwargs)
  File "/usr/lib/python2.5/logging/__init__.py", line 1101, in _log
    self.handle(record)
  File "/usr/lib/python2.5/logging/__init__.py", line 1111, in handle
    self.callHandlers(record)
  File "/usr/lib/python2.5/logging/__init__.py", line 1148, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python2.5/logging/__init__.py", line 655, in handle
    self.emit(record)
  File "/usr/lib/python2.5/logging/handlers.py", line 655, in emit
    msg = self.format(record)
  File "/usr/lib/python2.5/logging/__init__.py", line 630, in format
    return fmt.format(record)
  File "/usr/lib/python2.5/logging/__init__.py", line 418, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.5/logging/__init__.py", line 288, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting


Expected results:
Command fails without a traceback.

Comment 1 Daniel Walsh 2008-11-05 15:54:39 UTC
Fixed in setroubleshoot-2.0.13

Comment 2 Bug Zapper 2008-11-26 04:47:27 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Bug Zapper 2009-11-18 12:39:32 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping