# ChangeLog for app-admin/syslog-ng
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/ChangeLog,v 1.308 2011/10/19 06:19:38 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/ChangeLog,v 1.309 2011/10/24 16:22:23 mr_bones_ Exp $
+
+ 24 Oct 2011; Michael Sterrett <mr_bones_@gentoo.org> syslog-ng-3.3.1.ebuild,
+ +files/syslog-ng-3.3.1-filter.patch:
+ add upstream patch to fix filter function
19 Oct 2011; Michael Sterrett <mr_bones_@gentoo.org> files/syslog-ng.rc6.3.3:
move reload to extra_started_commands
-AUX syslog-ng-3.3.1-ssl.patch 2261 RMD160 31a34fc25736d059d2703debe2f3efa641779db1 SHA1 d27afb9962fccc168479ab9d87f63a23722f0983 SHA256 239a4bf414442e8aa568f1a26dad54aa216e3f35107f06740fc6cf354935e1b2
+AUX syslog-ng-3.3.1-filter.patch 2291 RMD160 1e004c712b953ce97b99bc48ebf6afcf54a27ee3 SHA1 45d850e1bf3f7e95a1d2c25b89ea11d854e92e5d SHA256 ec35b270d48834639c0e5185bf4088ad3fba97647874379f8136e669ac3b9cca
+AUX syslog-ng-3.3.1-ssl.patch 1941 RMD160 30b8effa6b5e0994700f3a652b997a6c83341151 SHA1 138b55c4e7f48838752136746d0fe47aa305e5ca SHA256 560d67c39d1c9320ca353ae55e4b5da9fd656b854bf8f1d193e2f791047f1303
AUX syslog-ng.conf.gentoo.3.2 1314 RMD160 d8d12cbc02877baf4449590586798133d9914911 SHA1 af084e744864dcc292741df2cc701d1f8a982e00 SHA256 91221fe7aeb6dff126dd878f541366d00918a278f46348f6f763ad2cbc01ea19
AUX syslog-ng.conf.gentoo.3.3 1330 RMD160 0b55e8910274e898e7244fc6594bee74ef559943 SHA1 b36b047d73d9a0084019fcddac7fb7a354b01bdc SHA256 e0ff88d28e0fa9b5b2b96b13df2f14f1957996959a95f7ec6135b51b242a98cd
AUX syslog-ng.conf.gentoo.fbsd.3.2 689 RMD160 001482d7e90b44896d374f4a1049ece9541a8f2e SHA1 4be46d2f9461c45e743e10e69a4252ce599deee5 SHA256 7249cb13fff50e2695a427fe4dc1285dad6838f576304cb6ddde0c53ff9814ad
DIST syslog-ng_3.2.4.tar.gz 1435115 RMD160 2927ba4d9b8a913f7117a659806c1721fe3d244e SHA1 ff732f7223bd2bd0424d4b9028b523cf62133af1 SHA256 e7bbd53121b57ba49089a0f95bf10a393e62b27a575c83d08e668c9dc1fe2f15
DIST syslog-ng_3.3.1.tar.gz 2405280 RMD160 f337db97ff445d8bb8a087d1894103443d8d2c2c SHA1 f084d66754c7fa1eada56946f77ef3066faa27a1 SHA256 2cd5e0102504cb9d7bb25570bbb3fdd8657aa1b1afdc18f7b9aa892d8f9c9089
EBUILD syslog-ng-3.2.4.ebuild 3293 RMD160 6968178b4bc2d3d80e4e322a466bc3875cd04fc3 SHA1 e667079278b7a643518736171939b486b9c4e680 SHA256 0071029876f2a2a7029a7e356ad2f7f28de805dfe127d22f855a0a04feb7b985
-EBUILD syslog-ng-3.3.1.ebuild 3388 RMD160 1a6e4539a70ce9f0839cd2be659ad2195187bcf2 SHA1 ee4a5e27886ddd57ba0d3ac6534806a26228ab55 SHA256 4c76da8fe940b25d58838e0b47796bdc78750de58879313b15c11a44531c5233
-MISC ChangeLog 42146 RMD160 e44aa38db989cdf983a2e5b03f8ee2f8acc3f1ed SHA1 44376366af7ba494c5b05ccbe41bbc2e15537ba7 SHA256 b0e3a8d5bbe7e67da8d5588ac0524a1efa27beaf4c606d63f21ce660deec6b0c
+EBUILD syslog-ng-3.3.1.ebuild 3428 RMD160 297a78098d93a4fb965f76a8886a04b37b4c9236 SHA1 5b35ec400f1e1320440c126c090ddeabb047d2e5 SHA256 82cf954e5d77ae8ce844daba90b43c931821c839b700f70956f12ac6fa39f264
+MISC ChangeLog 42309 RMD160 1a395e1315d8cdd8f09ffd13a12b6d2f310480f2 SHA1 b3ce1d309ffbb65bed0c5f6432832d23308cfc79 SHA256 d1e18f14a6512323f03ee0f1cc6847401d118659eea78188252d7d96aa420935
MISC metadata.xml 559 RMD160 ea078d9f0296f07dc3ffa3f0f8ae69f979ba4d3b SHA1 0ec5700dd8e3ae0ae458086778908b818349061a SHA256 b0a3c093ff517898bb36172559a8778e0290a5a95255df64e1fe223232837cd7
--- /dev/null
+commit 4b438115f6387eb52b6c39c1f751ecf0c4a5ac5f
+Author: Balazs Scheidler <bazsi@balabit.hu>
+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@umail.iu.edu>
+ Cc: <syslog-ng-stable@balabit.hu>
+ Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
+
+--- 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;
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
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 @@
/* 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 @@
/* 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 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild,v 1.4 2011/10/18 20:21:58 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild,v 1.5 2011/10/24 16:22:23 mr_bones_ Exp $
EAPI=2
inherit autotools fixheadtails eutils multilib
S=${WORKDIR}/${PN}-${MY_PV}
src_prepare() {
- epatch "${FILESDIR}"/${P}-ssl.patch
+ epatch \
+ "${FILESDIR}"/${P}-ssl.patch \
+ "${FILESDIR}"/${P}-filter.patch
ht_fix_file configure.in
eautoreconf
}