Hello community,

here is the log from the commit of package syslog-ng for openSUSE:12.1 checked 
in at 2011-10-25 17:12:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.1/syslog-ng (Old)
 and      /work/SRC/openSUSE:12.1/.syslog-ng.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "syslog-ng", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:12.1/syslog-ng/syslog-ng.changes 2011-10-24 
13:27:42.000000000 +0200
+++ /work/SRC/openSUSE:12.1/.syslog-ng.new/syslog-ng.changes    2011-10-25 
17:12:59.000000000 +0200
@@ -1,0 +2,7 @@
+Tue Oct 25 11:22:09 CEST 2011 - [email protected]
+
+- add patch for filters bug
+  https://bugzilla.balabit.com/show_bug.cgi?id=140
+  so firewall logs are correctly filtered
+
+-------------------------------------------------------------------

New:
----
  syslog-ng-3.3.1-filters.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ syslog-ng.spec ++++++
--- /var/tmp/diff_new_pack.ZWsKOo/_old  2011-10-25 17:13:06.000000000 +0200
+++ /var/tmp/diff_new_pack.ZWsKOo/_new  2011-10-25 17:13:06.000000000 +0200
@@ -41,6 +41,7 @@
 Source2:        syslog-ng.sysconfig
 Source3:        syslog-ng.conf.default
 Patch0:         syslog-ng-%{version}-less-static.diff
+Patch1:         syslog-ng-%{version}-filters.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  bison flex gcc-c++ glib2-devel pkgconfig
 BuildRequires:  python tcpd-devel
@@ -143,6 +144,7 @@
 %if 0%{suse_version} <= 1130
 %patch0 -p0
 %endif
+%patch1 -p1
 
 cp -a $RPM_SOURCE_DIR/syslog-ng.rc-script    .
 cp -a $RPM_SOURCE_DIR/syslog-ng.conf.default .

++++++ syslog-ng-3.3.1-filters.diff ++++++
commit 4b438115f6387eb52b6c39c1f751ecf0c4a5ac5f
Author: Balazs Scheidler <[email protected]>
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 <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Balazs Scheidler <[email protected]>

diff --git a/lib/filter.c b/lib/filter.c
index a551559..d88e439 100644
--- 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;
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to