Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
Fedora Release Engineering | d32a2fee26 | |
Bill Nottingham | 89f3ae89a8 | |
Daniel J Walsh | 893a1d7899 | |
Daniel J Walsh | 1912bd0f58 | |
Daniel J Walsh | 11b5302fd6 | |
Daniel J Walsh | e003d0c869 | |
Jesse Keating | a259338ede |
21
Makefile
21
Makefile
|
@ -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)
|
|
@ -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)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
@ -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
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue