Bug 462913 - sealert won't erase some entries
Summary: sealert won't erase some entries
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: setroubleshoot
Version: 8
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-19 17:13 UTC by John Griffiths
Modified: 2008-11-27 12:19 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-11-27 12:19:12 UTC
Type: ---
Embargoed:


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

Description John Griffiths 2008-09-19 17:13:26 UTC
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):
setroubleshoot-2.0.5-2.fc8

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 15:12:39 UTC
Could you please attach the sealert from one of the messages?

Comment 2 John Griffiths 2008-09-22 16:39:13 UTC
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 18:11:13 UTC
I guess we really need the database also.

/var/lib/setroubleshoot/audit_listener_database.xml

Comment 4 John Griffiths 2008-09-22 20:04:22 UTC
That was already attached. Do you need another copy?

Comment 5 Daniel Walsh 2008-09-23 18:12:42 UTC
No my mistake.

Comment 6 Daniel Walsh 2008-09-23 18:34:33 UTC
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 19:53:01 UTC
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 11:10:09 UTC
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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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