mr_bones_ 11/10/24 16:22:23
Modified: syslog-ng-3.3.1-ssl.patch
Added: syslog-ng-3.3.1-filter.patch
Log:
add upstream patch to fix filter function
(Portage version: 2.1.10.11/cvs/Linux i686)
Revision Changes Path
1.2 app-admin/syslog-ng/files/syslog-ng-3.3.1-ssl.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/syslog-ng-3.3.1-ssl.patch?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/syslog-ng-3.3.1-ssl.patch?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/syslog-ng-3.3.1-ssl.patch?r1=1.1&r2=1.2
Index: syslog-ng-3.3.1-ssl.patch
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng-3.3.1-ssl.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- syslog-ng-3.3.1-ssl.patch 7 Oct 2011 16:40:50 -0000 1.1
+++ syslog-ng-3.3.1-ssl.patch 24 Oct 2011 16:22:23 -0000 1.2
@@ -13,8 +13,6 @@
tests/loggen/loggen.c | 3 +++
4 files changed, 14 insertions(+), 0 deletions(-)
-diff --git a/configure.in b/configure.in
-index 13bc874..686911e 100644
--- a/configure.in
+++ b/configure.in
@@ -679,6 +679,10 @@ else
@@ -28,8 +26,6 @@
dnl
dnl Right now, openssl is never linked statically as it is only used by the
dnl TLS build of the afsocket plugin which is loaded dynamically anyway.
-diff --git a/lib/crypto.c b/lib/crypto.c
-index 702609c..ac4d070 100644
--- a/lib/crypto.c
+++ b/lib/crypto.c
@@ -29,6 +29,8 @@
@@ -47,8 +43,6 @@
/* the crypto options (seed) are handled in main.c */
+
+#endif
-diff --git a/modules/afsql/afsql.c b/modules/afsql/afsql.c
-index eb59b57..02b9f83 100644
--- a/modules/afsql/afsql.c
+++ b/modules/afsql/afsql.c
@@ -35,7 +35,10 @@
@@ -62,8 +56,6 @@
/* field flags */
enum
-diff --git a/tests/loggen/loggen.c b/tests/loggen/loggen.c
-index c5399a7..bf11a1e 100644
--- a/tests/loggen/loggen.c
+++ b/tests/loggen/loggen.c
@@ -14,11 +14,14 @@
1.1 app-admin/syslog-ng/files/syslog-ng-3.3.1-filter.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/syslog-ng-3.3.1-filter.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/syslog-ng-3.3.1-filter.patch?rev=1.1&content-type=text/plain
Index: syslog-ng-3.3.1-filter.patch
===================================================================
commit 4b438115f6387eb52b6c39c1f751ecf0c4a5ac5f
Author: Balazs Scheidler <bazsi@...>
Date: Sun Oct 23 20:19:58 2011 +0200
filters: fixed filter() evaluation when embedded as an AND/OR subexpression
When introducing the "init" method for filters one case was omitted: even
though AND and OR expressions don't want to do anything on init, their
subexpressions might, so this patch adds an init function to AND and OR
which does nothing but calls the same for its "left" and "right"
subexpression.
This patch fixes filter("xxx") expression evaluation when that is
not a single expression, but rather included in an AND or OR.
Reported-By: Leonid Isaev <lisaev@...>
Cc: <syslog-ng-stable@...>
Signed-off-by: Balazs Scheidler <bazsi@...>
--- a/lib/filter.c
+++ b/lib/filter.c
@@ -84,6 +84,17 @@ typedef struct _FilterOp
} FilterOp;
static void
+fop_init(FilterExprNode *s, GlobalConfig *cfg)
+{
+ FilterOp *self = (FilterOp *) s;
+
+ if (self->left && self->left->init)
+ self->left->init(self->left, cfg);
+ if (self->right && self->right->init)
+ self->right->init(self->right, cfg);
+}
+
+static void
fop_free(FilterExprNode *s)
{
FilterOp *self = (FilterOp *) s;
@@ -92,6 +103,14 @@ fop_free(FilterExprNode *s)
filter_expr_unref(self->right);
}
+static void
+fop_init_instance(FilterOp *self)
+{
+ filter_expr_node_init(&self->super);
+ self->super.init = fop_init;
+ self->super.free_fn = fop_free;
+}
+
static gboolean
fop_or_eval(FilterExprNode *s, LogMessage *msg)
{
@@ -105,9 +124,8 @@ fop_or_new(FilterExprNode *e1, FilterExprNode *e2)
{
FilterOp *self = g_new0(FilterOp, 1);
- filter_expr_node_init(&self->super);
+ fop_init_instance(self);
self->super.eval = fop_or_eval;
- self->super.free_fn = fop_free;
self->super.modify = e1->modify || e2->modify;
self->left = e1;
self->right = e2;
@@ -128,9 +146,8 @@ fop_and_new(FilterExprNode *e1, FilterExprNode *e2)
{
FilterOp *self = g_new0(FilterOp, 1);
- filter_expr_node_init(&self->super);
+ fop_init_instance(self);
self->super.eval = fop_and_eval;
- self->super.free_fn = fop_free;
self->super.modify = e1->modify || e2->modify;
self->left = e1;
self->right = e2;
|