import setroubleshoot-3.3.26-2.el8
This commit is contained in:
parent
f36f311fe1
commit
ca74924c74
40
SOURCES/0005-Improve-after_first-email-filter-behavior.patch
Normal file
40
SOURCES/0005-Improve-after_first-email-filter-behavior.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 73d60acf9d4d7ae740d450f9c9a9566dac1c3111 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Lautrbach <plautrba@redhat.com>
|
||||
Date: Thu, 3 Feb 2022 18:14:05 +0100
|
||||
Subject: [PATCH] Improve after_first email filter behavior
|
||||
|
||||
after_first used to send 2 emails before it started to filter. The
|
||||
problem was in the email users were not saved into database when a new
|
||||
signature was created.
|
||||
|
||||
Also we need to skip email users when we evaluated whether send a
|
||||
desktop notification or not.
|
||||
---
|
||||
src/setroubleshoot/server.py | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/framework/src/setroubleshoot/server.py b/framework/src/setroubleshoot/server.py
|
||||
index 771ea15..10ef215 100755
|
||||
--- a/framework/src/setroubleshoot/server.py
|
||||
+++ b/framework/src/setroubleshoot/server.py
|
||||
@@ -220,6 +220,7 @@ class AlertPluginReportReceiver(PluginReportReceiver):
|
||||
if len(to_addrs):
|
||||
from setroubleshoot.email_alert import email_alert
|
||||
email_alert(siginfo, to_addrs)
|
||||
+ self.database.mark_modified()
|
||||
|
||||
log_debug("sending alert to all clients")
|
||||
|
||||
@@ -234,6 +235,9 @@ class AlertPluginReportReceiver(PluginReportReceiver):
|
||||
systemd.journal.send(siginfo.format_text(), OBJECT_PID=pid, SYSLOG_IDENTIFIER=pkg_name)
|
||||
|
||||
for u in siginfo.users:
|
||||
+ if u.username[0:6] == "email:":
|
||||
+ # skip email users - they were evaluated before
|
||||
+ continue
|
||||
action = siginfo.evaluate_filter_for_user(u.username)
|
||||
if action == "ignore":
|
||||
return siginfo
|
||||
--
|
||||
2.30.2
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Helps troubleshoot SELinux problems
|
||||
Name: setroubleshoot
|
||||
Version: 3.3.26
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2+
|
||||
URL: https://gitlab.com/setroubleshoot/framework
|
||||
Source0: https://releases.pagure.org/setroubleshoot/%{name}-%{version}.tar.gz
|
||||
@ -12,6 +12,7 @@ Patch0001: 0001-Stop-SetroubleshootFixit-after-10-seconds-of-inactiv.patch
|
||||
Patch0002: 0002-Do-not-use-Python-slip-package.patch
|
||||
Patch0003: 0003-Fix-typos-in-help-man-pages-and-developer-s-guide.patch
|
||||
Patch0004: 0004-Revert-Replace-pydbus-with-dasbus.patch
|
||||
Patch0005: 0005-Improve-after_first-email-filter-behavior.patch
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: libcap-ng-devel
|
||||
@ -201,6 +202,9 @@ chown -R setroubleshoot:setroubleshoot %{pkgvardatadir}
|
||||
%doc AUTHORS COPYING ChangeLog DBUS.md NEWS README TODO
|
||||
|
||||
%changelog
|
||||
* Fri Feb 11 2022 Vit Mojzis <vmojzis@redhat.com> - 3.3.26-2
|
||||
- Improve after_first email filter behavior (#2050734)
|
||||
|
||||
* Fri Dec 10 2021 Vit Mojzis <vmojzis@redhat.com> - 3.3.26-1
|
||||
- Revert "Replace pydbus with dasbus"
|
||||
- Fix typos in --help, man pages and developer's guide (#2028226)
|
||||
|
Loading…
Reference in New Issue
Block a user