Bug 788196

Summary: "sealert" returns error when "-H" option is used
Product: Red Hat Enterprise Linux 6 Reporter: tvizirov
Component: setroubleshootAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: low Docs Contact:
Priority: low    
Version: 6.2CC: ddumas, mgrepl, mhomolov, mmalik, mtruneck
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: setroubleshoot-3.0.47-4.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Red Hat Enterprise Linux Server release 6.2 (Santiago) Kernel 2.6.32-220.4.1.el6.x86_64
Last Closed: 2013-02-21 10:05:30 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: 782183, 840699    

Description tvizirov 2012-02-07 17:28:16 UTC
Description of problem:

The "-H" option used with sealert seems to be not recognized as valid option:

# sealert -a /var/log/audit/audit.log -H > audit.html
# cat audit.html
[Errno 2] No such file or directory: '-H'


Version-Release number of selected component (if applicable):

setroubleshoot-server-3.0.38-2.1.el6.x86_64
setroubleshoot-plugins-3.0.16-1.el6.noarch
setroubleshoot-debuginfo-3.0.38-2.1.el6.x86_64
setroubleshoot-3.0.38-2.1.el6.x86_64


How reproducible:

Reproducible on every RHEL6.2 machine. Not tested on RHEL6.1 or RHEL6.0 

Steps to Reproduce:
1. Issue the command: # sealert -a /var/log/audit/audit.log -H > audit.html
2. It will complete with no output or error
3. When opening the audit.log, we see only the error:
[Errno 2] No such file or directory: '-H'
  
Actual results:

We receive an error:
[Errno 2] No such file or directory: '-H'

Expected results:

The same command on RHEL5.7 ends with no errors and the file (audit.log) could be opened in a web browser. 

It works with the following packages: 
setroubleshoot-server-2.0.5-5.el5                                                                                               
setroubleshoot-plugins-2.0.4-2.el5                                                                                              
setroubleshoot-2.0.5-5.el5


Additional info:

Here is an excerpt from the "man sealert" command on RHEL6.2:

OPTIONS
       -b --browser
              Launch the browser

       -h --help
              Show this message

       -H --html_output
              Ouput in html, Used with the -a or -l option

       -s --service
              Start sealert service,  Usually used by dbus.

       -S --noservice
              Start sealert without dbus service as stand alone app

       -l --lookupid id
              Lookup alert by id, if id is wildcard * then return all alerts

       -a --analyze file
              Scan a log file, analyze it’s AVC’s

Comment 3 Milos Malik 2012-02-08 08:10:31 UTC
1) Both options (short and long) do not work as expected.

# sealert -a /var/log/audit/audit.log -H
[Errno 2] No such file or directory: '-H'
# echo $?
3
# sealert -a /var/log/audit/audit.log --html_output
[Errno 2] No such file or directory: '--html_output'
# echo $?
3
# 

2) Both options are mentioned in sealert man page only. Help message does not contain them.

# sealert --help | grep -i html
# echo $?
1
#

Comment 5 RHEL Program Management 2012-05-03 05:37:28 UTC
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

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.

Comment 6 tvizirov 2012-06-22 09:42:43 UTC
Hi, 

I would like to clarify something about this bug. Is the -H option going to be re-implemented in the next version, or this bug will just remove the -H option from the man page?

Comment 7 Daniel Walsh 2012-06-26 10:48:06 UTC
-H should no longer exist in man page.

Comment 15 errata-xmlrpc 2013-02-21 10:05:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0387.html