From 37d02e387a5b829bebed12315bdb205efb8571e4 Mon Sep 17 00:00:00 2001
From: alakatos
Date: Tue, 5 Apr 2022 10:36:46 +0200
Subject: [PATCH] Add deleteStateOnFileMove imfile module option resolves:
rhbz#2069664 Add inotify_rm_watch() inotify API call when object needs to be
destroyed resolves: rhbz#2070528 Fix error handling in gtlsRecordRecv,
which can cause full CPU usage
---
...-8.2102.0-rhbz1909639-statefiles-doc.patch | 47 ++++
...-8.2102.0-rhbz1909639-statefiles-fix.patch | 162 +++++++++++++
...rhbz2046158-gnutls-broken-connection.patch | 215 ++++++++++++++++++
rsyslog.spec | 51 +++--
4 files changed, 456 insertions(+), 19 deletions(-)
create mode 100644 rsyslog-8.2102.0-rhbz1909639-statefiles-doc.patch
create mode 100644 rsyslog-8.2102.0-rhbz1909639-statefiles-fix.patch
create mode 100644 rsyslog-8.2102.0-rhbz2046158-gnutls-broken-connection.patch
diff --git a/rsyslog-8.2102.0-rhbz1909639-statefiles-doc.patch b/rsyslog-8.2102.0-rhbz1909639-statefiles-doc.patch
new file mode 100644
index 0000000..b717972
--- /dev/null
+++ b/rsyslog-8.2102.0-rhbz1909639-statefiles-doc.patch
@@ -0,0 +1,47 @@
+diff -up rsyslog-8.2102.0/doc/configuration/modules/imfile.html.state-file-leaking-doc rsyslog-8.2102.0/doc/configuration/modules/imfile.html
+--- rsyslog-8.2102.0/doc/configuration/modules/imfile.html.state-file-leaking-doc 2021-02-15 12:53:31.000000000 +0100
++++ rsyslog-8.2102.0/doc/configuration/modules/imfile.html 2022-03-29 10:35:07.187827004 +0200
+@@ -294,6 +294,28 @@ rsyslog needs write permissions to work
+ also might require SELinux definitions (or similar for other enhanced security
+ systems).
+
++
++
deleteStateOnFileMove
++
++
++type |
++default |
++mandatory |
++obsolete legacy directive |
++
++
++
++binary |
++off |
++no |
++none |
++
++
++
++
This parameter controls if state files are deleted if their associated main file is rotated via move. Usually, this is a good idea, because otherwise state files are not deleted when log rotation occurs.
++
++
However, there is one situation where not deleting associated state file after log rotation makes sense: this is the case if a monitored file is later moved back to the same location as it was before.
++
+
+