summaryrefslogtreecommitdiff
path: root/sysutils/syslog-ng/files/patch-lib_logmatcher.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-06-30 09:18:44 -0700
committerCy Schubert <cy@FreeBSD.org>2022-06-30 09:22:09 -0700
commit9f15b375dc27612c4f6ec121bf195e20e620e0a3 (patch)
treeba3d255cead9e32a941716b8c2fbf84a1495e85f /sysutils/syslog-ng/files/patch-lib_logmatcher.c
parentwww/ffsend: Return to pool (diff)
sysutils/syslog-ng: Update to 3.37.1
Update to 3.37.1 and apply a number of other fixes supplied by our upstream that didn't make it into the release. Patch was created and tested by our upstream representative Peter Czanik. Submitted by: Peter Czanik (CzP) <peter.czanik@oneidentity.com> Balabit (a OneIdentity company) / syslog-ng upstream
Diffstat (limited to 'sysutils/syslog-ng/files/patch-lib_logmatcher.c')
-rw-r--r--sysutils/syslog-ng/files/patch-lib_logmatcher.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/sysutils/syslog-ng/files/patch-lib_logmatcher.c b/sysutils/syslog-ng/files/patch-lib_logmatcher.c
new file mode 100644
index 000000000000..256fd56f7616
--- /dev/null
+++ b/sysutils/syslog-ng/files/patch-lib_logmatcher.c
@@ -0,0 +1,28 @@
+--- lib/logmatcher.c.orig 2022-06-03 13:40:38 UTC
++++ lib/logmatcher.c
+@@ -30,14 +30,6 @@
+ #include "compat/string.h"
+ #include "compat/pcre.h"
+
+-static gboolean
+-_shall_set_values_indirectly(NVHandle value_handle)
+-{
+- return value_handle != LM_V_NONE &&
+- !log_msg_is_handle_macro(value_handle) &&
+- !log_msg_is_handle_match(value_handle);
+-}
+-
+ static void
+ log_matcher_store_pattern(LogMatcher *self, const gchar *pattern)
+ {
+@@ -416,7 +408,9 @@ log_matcher_pcre_re_feed_value(LogMatcherPcreRe *self,
+ LogMatcherPcreMatchResult *result,
+ gint begin_index, gint end_index)
+ {
+- gboolean indirect = _shall_set_values_indirectly(result->source_handle);
++ gboolean indirect = result->source_handle != LM_V_NONE &&
++ log_msg_is_handle_settable_with_an_indirect_value(target_handle) &&
++ log_msg_is_handle_referencable_from_an_indirect_value(result->source_handle);
+
+ if (target_handle == result->source_handle)
+ {