Hello community,

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

Package is "syslog-ng", Maintainer is "m...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/syslog-ng/syslog-ng.changes      2011-10-04 
18:15:11.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.syslog-ng.new/syslog-ng.changes 2011-10-25 
17:12:51.000000000 +0200
@@ -1,0 +2,7 @@
+Tue Oct 25 11:22:09 CEST 2011 - cza...@balabit.hu
+
+- 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.e8Rtq3/_old  2011-10-25 17:12:59.000000000 +0200
+++ /var/tmp/diff_new_pack.e8Rtq3/_new  2011-10-25 17:12:59.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 <ba...@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 <lis...@umail.iu.edu>
    Cc: <syslog-ng-sta...@balabit.hu>
    Signed-off-by: Balazs Scheidler <ba...@balabit.hu>

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: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to