Compare commits

...

7 Commits
master ... f10

Author SHA1 Message Date
Fedora Release Engineering d32a2fee26 dist-git conversion 2010-07-29 12:38:35 +00:00
Bill Nottingham 89f3ae89a8 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:38:56 +00:00
Daniel J Walsh 893a1d7899 - Fix log_stats in analyze to output avc data not audit_event 2009-05-21 17:47:02 +00:00
Daniel J Walsh 1912bd0f58 - Fix log_stats in analyze to output avc data not audit_event 2009-05-21 17:44:12 +00:00
Daniel J Walsh 11b5302fd6 - Fix analyze to purge properly without recursing 2008-11-10 21:28:05 +00:00
Daniel J Walsh e003d0c869 - Fix analyze to purge properly without recursing 2008-11-10 21:23:05 +00:00
Jesse Keating a259338ede Initialize branch F-10 for setroubleshoot 2008-11-07 03:30:45 +00:00
5 changed files with 74 additions and 22 deletions

View File

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: setroubleshoot
# $Id: Makefile,v 1.1 2006/07/18 19:48:52 jdennis Exp $
NAME := setroubleshoot
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -0,0 +1,12 @@
diff -up setroubleshoot-2.0.12/src/analyze.py~ setroubleshoot-2.0.12/src/analyze.py
--- setroubleshoot-2.0.12/src/analyze.py~ 2009-05-21 13:41:16.000000000 -0400
+++ setroubleshoot-2.0.12/src/analyze.py 2009-05-21 13:42:08.000000000 -0400
@@ -168,7 +168,7 @@ class Analyze(object):
if profile:
statistics.end()
- log_stats.info("analyze_avc() audit_event=%s\nstatistics=%s", audit_event, statistics)
+ log_stats.info("analyze_avc() avc=%s\nstatistics=%s", avc, statistics)
#------------------------------------------------------------------------------

View File

@ -0,0 +1,51 @@
diff -up setroubleshoot-2.0.12/src/analyze.py~ setroubleshoot-2.0.12/src/analyze.py
--- setroubleshoot-2.0.12/src/analyze.py~ 2008-09-22 15:40:57.000000000 -0400
+++ setroubleshoot-2.0.12/src/analyze.py 2008-11-10 16:20:45.000000000 -0500
@@ -278,7 +278,7 @@ class SETroubleshootDatabase(object):
self.sigs.signature_list[-1].last_seen_date.format())
sigs = [siginfo.sig for siginfo in self.sigs.signature_list[:keep]]
for sig in sigs:
- self.delete_signature(sig)
+ self.delete_signature(sig, False)
if self.max_alerts:
keep = len(self.sigs.signature_list) - self.max_alerts
@@ -287,7 +287,7 @@ class SETroubleshootDatabase(object):
if debug:
log_database.debug("prune first %d alerts, len(sigs=%d sigs=%s", keep, len(sigs), sigs)
for sig in sigs:
- self.delete_signature(sig)
+ self.delete_signature(sig, False)
def set_notify(self, notify):
self.notify = notify
@@ -412,15 +412,15 @@ class SETroubleshootDatabase(object):
sigs.add_siginfo(siginfo)
return sigs
- def delete_signature(self, sig):
- if debug:
- log_database.debug("delete_signature: sig=%s", sig)
+ def delete_signature(self, sig, mark = True):
+ log_database.debug("delete_signature: sig=%s", sig)
siginfo = self.lookup_signature(sig)
self.sigs.remove_siginfo(siginfo)
if self.notify:
self.notify.signatures_updated('delete', siginfo.local_id)
- self.mark_modified()
+ if mark:
+ self.mark_modified()
def modify_siginfo(self, siginfo):
if self.notify:
@@ -560,8 +560,7 @@ class LogfileAnalyzer(gobject.GObject):
log_avc.error('%s.open()', self.__class__.__name__, e.strerror)
self.errno = e.errno
self.strerror = e.strerror
- self.emit('state-changed', 'stopped')
- return False
+ raise e
self.n_bytes_read = 0
self.line_count = 0

View File

@ -1,13 +1,15 @@
Summary: Helps troubleshoot SELinux problems
Name: setroubleshoot
Version: 2.0.12
Release: 1%{?dist}
Release: 4%{?dist}
License: GPLv2+
Group: Applications/System
URL: https://fedorahosted.org/setroubleshoot
Source0: %{name}-%{version}.tar.gz
Source1: setroubleshoot.init
Source2: setroubleshoot.logrotate
Patch1: setroubleshoot-purge.patch
Patch2: setroubleshoot-analyze.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl-XML-Parser
@ -84,6 +86,8 @@ touch --no-create %{_datadir}/icons/hicolor
%prep
%setup -q
%patch1 -p1 -b .purge
%patch2 -p1 -b .analyze
%build
%configure
@ -182,6 +186,12 @@ rm -rf %{buildroot}
%attr(0755,root,root) /etc/rc.d/init.d/%{name}
%changelog
* Thu May 21 2009 Dan Walsh <dwalsh@redhat.com> - 2.0.12-4
- Fix log_stats in analyze to output avc data not audit_event
* Mon Nov 10 2008 Dan Walsh <dwalsh@redhat.com> - 2.0.12-3
- Fix analyze to purge properly without recursing
* Wed Oct 15 2008 Dan Walsh <dwalsh@redhat.com> - 2.0.12-1
- Update to upstream
- 2008-10-06 Dan Walsh <dwalsh@redhat.com>