Bug 462913 - sealert won't erase some entries
sealert won't erase some entries
Product: Fedora
Classification: Fedora
Component: setroubleshoot (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-09-19 13:13 EDT by John Griffiths
Modified: 2008-11-27 07:19 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-11-27 07:19:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
setroubleshoot audit listener database (22.12 KB, text/xml)
2008-09-19 13:13 EDT, John Griffiths
no flags Details
sealert generated by SAMBA (2.64 KB, text/plain)
2008-09-22 12:39 EDT, John Griffiths
no flags Details

  None (edit)
Description John Griffiths 2008-09-19 13:13:26 EDT
Created attachment 317211 [details]
setroubleshoot audit listener database

Description of problem:

I have four entries that show up in sealert browser mode that will not erase. I select them, delete them, and remove those that are marked deleted and nothing happens. There are only four entries that do this. The other log entires can be deleted just fine.

The four entries don't seem to cause any problems; they are just an annoyance. Any help would be appreciated. 

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

How reproducible:
I don't know how it got to this state, but it currently these four entries appear every time I open sealert.
Comment 1 Daniel Walsh 2008-09-22 11:12:39 EDT
Could you please attach the sealert from one of the messages?
Comment 2 John Griffiths 2008-09-22 12:39:13 EDT
Created attachment 317382 [details]
sealert generated by SAMBA

As a note, the boolean was set and SAMBA home directories work fine.
Comment 3 Daniel Walsh 2008-09-22 14:11:13 EDT
I guess we really need the database also.

Comment 4 John Griffiths 2008-09-22 16:04:22 EDT
That was already attached. Do you need another copy?
Comment 5 Daniel Walsh 2008-09-23 14:12:42 EDT
No my mistake.
Comment 6 Daniel Walsh 2008-09-23 14:34:33 EDT
The problem here is somehow you ended up with duplicate signatures, which I guess should never happen.  When you go to delete, the tool is raising and exception and exiting out.

john what do you think of this patch, to just warn and allow the deletion.

 diff -u analyze.py /usr/lib/python2.5/site-packages/setroubleshoot/analyze.py  
--- analyze.py	2008-01-14 14:48:29.000000000 -0500
+++ /usr/lib/python2.5/site-packages/setroubleshoot/analyze.py	2008-09-23 14:29:29.000000000 -0400
@@ -363,7 +363,8 @@
         if len(matches) == 0:
             raise ProgramError(ERR_NO_SIGNATURE_MATCH)
         elif len(matches) > 1:
-            raise ProgramError(ERR_MULTIPLE_SIGNATURE_MATCH)
+            log_sig.warn("lookup_signature: found %d matches with scores %s",
+                          len(matches), ",".join(["%.2f" % x.score for x in matches]))
         siginfo = matches[0].siginfo
         return siginfo
Comment 7 John Dennis 2008-09-23 15:53:01 EDT
Sure, that's OK. I tweaked it a little so that if we get this abberant situation it will print out the signatures and the local id's so we can diagnose the problem later. I've attached my version of the function.

What is more troubling to me is how we got duplicate entries in the first place, that should never happen and why the original code threw an exception instead of just emitting a warning.

    def lookup_signature(self, sig):
        siginfo = None

        matches = self.sigs.match_signatures(sig)
        if debug:
            log_sig.debug("lookup_signature: found %d matches with scores %s",
                          len(matches), ",".join(["%.2f" % x.score for x in matches]))
        if len(matches) == 0:
            raise ProgramError(ERR_NO_SIGNATURE_MATCH)
        elif len(matches) > 1:
            i = 0
            for m in matches:
                log_sig.warn("lookup_signature() duplicate match[%d] local_id=%s\n%s", 
                             i, m.siginfo.local_id, str(m.siginfo.sig))
                i += 1
        siginfo = matches[0].siginfo
        return siginfo
Comment 8 Bug Zapper 2008-11-26 06:10:09 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  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 '8'.

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 8'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 8 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: 

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