public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-admin/syslog-ng/files/3.4: syslog-ng.rc6 syslog-ng.conf.gentoo.fbsd syslog-ng.conf.gentoo syslog-ng.conf.gentoo.hardened syslog-ng.confd syslog-ng-3.4.1-rollup.patch
@ 2013-04-28  4:50 Michael Sterrett (mr_bones_)
  0 siblings, 0 replies; only message in thread
From: Michael Sterrett (mr_bones_) @ 2013-04-28  4:50 UTC (permalink / raw
  To: gentoo-commits

mr_bones_    13/04/28 04:50:34

  Added:                syslog-ng.rc6 syslog-ng.conf.gentoo.fbsd
                        syslog-ng.conf.gentoo
                        syslog-ng.conf.gentoo.hardened syslog-ng.confd
                        syslog-ng-3.4.1-rollup.patch
  Log:
  masked bump to next version series
  
  (Portage version: 2.1.11.55/cvs/Linux x86_64, unsigned Manifest commit)

Revision  Changes    Path
1.1                  app-admin/syslog-ng/files/3.4/syslog-ng.rc6

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.rc6?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.rc6?rev=1.1&content-type=text/plain

Index: syslog-ng.rc6
===================================================================
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.rc6,v 1.1 2013/04/28 04:50:34 mr_bones_ Exp $

SYSLOG_NG_CONFIGFILE=${SYSLOG_NG_CONFIGFILE:-/etc/syslog-ng/${RC_SVCNAME}.conf}
SYSLOG_NG_STATEFILE_DIR=${SYSLOG_NG_PIDFILE_DIR:-/var/lib/syslog-ng}
SYSLOG_NG_STATEFILE=${SYSLOG_NG_STATEFILE:-${SYSLOG_NG_STATEFILE_DIR}/syslog-ng.persist}
SYSLOG_NG_PIDFILE_DIR=${SYSLOG_NG_PIDFILE_DIR:-/var/run}
SYSLOG_NG_PIDFILE=${SYSLOG_NG_PIDFILE:-${SYSLOG_NG_PIDFILE_DIR}/${RC_SVCNAME}.pid}

SYSLOG_NG_GROUP=${SYSLOG_NG_GROUP:-root}
SYSLOG_NG_USER=${SYSLOG_NG_USER:-root}

command="syslog-ng"
command_args="--persist-file \"${SYSLOG_NG_STATEFILE}\" --cfgfile \"${SYSLOG_NG_CONFIGFILE}\" --pidfile \"${SYSLOG_NG_PIDFILE}\" ${SYSLOG_NG_OPTS}"
extra_commands="checkconfig"
extra_started_commands="reload"
pidfile="${SYSLOG_NG_PIDFILE}"
start_stop_daemon_args="--user \"${SYSLOG_NG_USER}\":\"${SYSLOG_NG_GROUP}\""
description="Syslog-ng is a syslog replacement with advanced filtering features."
description_checkconfig="Check the configuration file that will be used by \"start\""
description_reload="Reload the configuration without exiting"

depend() {
	if [ ! -e "${SYSLOG_NG_CONFIGFILE}" ] ; then
		eerror "You need to create ${SYSLOG_NG_CONFIGFILE} first."
		eerror "An example can be found in /usr/share/doc/syslog"

		return 1
	fi
	config "${SYSLOG_NG_CONFIGFILE}"
	use clock
	need hostname localmount
	after bootmisc
	provide logger
}

checkconfig() {
	ebegin "Checking your configfile (${SYSLOG_NG_CONFIGFILE})"
	syslog-ng -s -f "${SYSLOG_NG_CONFIGFILE}"
	eend $? "Configuration error. Please fix your configfile (${SYSLOG_NG_CONFIGFILE})"
}

start_pre() {
    checkconfig || return 1
    checkpath \
	-d \
	--mode 0600 \
	--owner "${SYSLOG_NG_OWNER}:${SYSLOG_NG_GROUP}" \
	"${SYSLOG_NG_STATEFILE_DIR}"
}

stop_pre() {
    [ "$RC_CMD" = restart ] && sleep 1
    return 0
}

reload() {
	checkconfig || return 1
	ebegin "Reloading configuration and re-opening log files"
	start-stop-daemon --signal HUP --pidfile "${pidfile}"
	eend $?
}



1.1                  app-admin/syslog-ng/files/3.4/syslog-ng.conf.gentoo.fbsd

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.conf.gentoo.fbsd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.conf.gentoo.fbsd?rev=1.1&content-type=text/plain

Index: syslog-ng.conf.gentoo.fbsd
===================================================================
@version: 3.4
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.conf.gentoo.fbsd,v 1.1 2013/04/28 04:50:34 mr_bones_ Exp $
#
# Syslog-ng default configuration file for Gentoo FreeBSD
#

# https://bugs.gentoo.org/show_bug.cgi?id=426814
@include "scl.conf"

options {
	threaded(yes);
	chain_hostnames(no);

	# The default action of syslog-ng is to log a STATS line
	# to the file every 10 minutes.  That's pretty ugly after a while.
	# Change it to every 12 hours so you get a nice daily update of
	# how many messages syslog-ng missed (0).
	stats_freq(43200); 
};

source src {
    unix-dgram("/var/run/log");
    internal();
    file("/dev/klog");
};

destination messages { file("/var/log/messages"); };

log { source(src); destination(messages); };



1.1                  app-admin/syslog-ng/files/3.4/syslog-ng.conf.gentoo

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.conf.gentoo?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.conf.gentoo?rev=1.1&content-type=text/plain

Index: syslog-ng.conf.gentoo
===================================================================
@version: 3.4
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.conf.gentoo,v 1.1 2013/04/28 04:50:34 mr_bones_ Exp $
#
# Syslog-ng default configuration file for Gentoo Linux

# https://bugs.gentoo.org/show_bug.cgi?id=426814
@include "scl.conf"

options { 
	threaded(yes);
	chain_hostnames(no); 

	# The default action of syslog-ng is to log a STATS line
	# to the file every 10 minutes.  That's pretty ugly after a while.
	# Change it to every 12 hours so you get a nice daily update of
	# how many messages syslog-ng missed (0).
	stats_freq(43200); 
	# The default action of syslog-ng is to log a MARK line
	# to the file every 20 minutes.  That's seems high for most
	# people so turn it down to once an hour.  Set it to zero
	# if you don't want the functionality at all.
	mark_freq(3600); 
};

source src {
    # https://bugs.gentoo.org/show_bug.cgi?id=449260
    unix-dgram("/dev/log");
    internal();
    file("/proc/kmsg");
};

destination messages { file("/var/log/messages"); };

# By default messages are logged to tty12...
destination console_all { file("/dev/tty12"); };
# ...if you intend to use /dev/console for programs like xconsole
# you can comment out the destination line above that references /dev/tty12
# and uncomment the line below.
#destination console_all { file("/dev/console"); };

log { source(src); destination(messages); };
log { source(src); destination(console_all); };



1.1                  app-admin/syslog-ng/files/3.4/syslog-ng.conf.gentoo.hardened

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.conf.gentoo.hardened?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.conf.gentoo.hardened?rev=1.1&content-type=text/plain

Index: syslog-ng.conf.gentoo.hardened
===================================================================
@version: 3.4
# 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/files/3.4/syslog-ng.conf.gentoo.hardened,v 1.1 2013/04/28 04:50:34 mr_bones_ Exp $

# https://bugs.gentoo.org/show_bug.cgi?id=426814
@include "scl.conf"

#
# Syslog-ng configuration file, compatible with default hardened installations.
#

options {
	threaded(yes);
	chain_hostnames(no);
	stats_freq(43200);
};

source src {
    unix-dgram("/dev/log");
    internal();
};
source kernsrc {
    file("/proc/kmsg");
};

#source net { udp(); };
#log { source(net); destination(net_logs); };
#destination net_logs { file("/var/log/HOSTS/$HOST/$YEAR$MONTH$DAY.log"); };

destination authlog { file("/var/log/auth.log"); };
destination _syslog { file("/var/log/syslog"); };
destination cron { file("/var/log/cron.log"); };
destination daemon { file("/var/log/daemon.log"); };
destination kern { file("/var/log/kern.log"); file("/dev/tty12"); };
destination lpr { file("/var/log/lpr.log"); };
destination user { file("/var/log/user.log"); };
destination uucp { file("/var/log/uucp.log"); };
#destination ppp { file("/var/log/ppp.log"); };
destination mail { file("/var/log/mail.log"); };

destination avc { file("/var/log/avc.log"); };
destination audit { file("/var/log/audit.log"); };
destination pax { file("/var/log/pax.log"); };
destination grsec { file("/var/log/grsec.log"); };

destination mailinfo { file("/var/log/mail.info"); };
destination mailwarn { file("/var/log/mail.warn"); };
destination mailerr { file("/var/log/mail.err"); };

destination newscrit { file("/var/log/news/news.crit"); };
destination newserr { file("/var/log/news/news.err"); };
destination newsnotice { file("/var/log/news/news.notice"); };

destination debug { file("/var/log/debug"); };
destination messages { file("/var/log/messages"); };
destination console { usertty("root"); };
destination console_all { file("/dev/tty12"); };
#destination loghost { udp("loghost" port(999)); };

destination xconsole { pipe("/dev/xconsole"); };

filter f_auth { facility(auth); };
filter f_authpriv { facility(auth, authpriv); };
filter f_syslog { not facility(authpriv, mail); };
filter f_cron { facility(cron); };
filter f_daemon { facility(daemon); };
filter f_kern { facility(kern); };
filter f_lpr { facility(lpr); };
filter f_mail { facility(mail); };
filter f_user { facility(user); };
filter f_uucp { facility(uucp); };
#filter f_ppp { facility(ppp); };
filter f_news { facility(news); };
filter f_debug { not facility(auth, authpriv, news, mail); };
filter f_messages { level(info..warn)
	and not facility(auth, authpriv, mail, news); };
filter f_emergency { level(emerg); };

filter f_info { level(info); };

filter f_notice { level(notice); };
filter f_warn { level(warn); };
filter f_crit { level(crit); };
filter f_err { level(err); };

filter f_avc { message(".*avc: .*"); };
filter f_audit { message("^(\\[.*\..*\] |)audit.*") and not message(".*avc: .*"); };
filter f_pax { message("^(\\[.*\..*\] |)PAX:.*"); };
filter f_grsec { message("^(\\[.*\..*\] |)grsec:.*"); };

log { source(src); filter(f_authpriv); destination(authlog); };
log { source(src); filter(f_syslog); destination(_syslog); };
log { source(src); filter(f_cron); destination(cron); };
log { source(src); filter(f_daemon); destination(daemon); };
log { source(kernsrc); filter(f_kern); destination(kern); };
log { source(src); filter(f_lpr); destination(lpr); };
log { source(src); filter(f_mail); destination(mail); };
log { source(src); filter(f_user); destination(user); };
log { source(src); filter(f_uucp); destination(uucp); };
log { source(kernsrc); filter(f_pax); destination(pax); };
log { source(kernsrc); filter(f_grsec); destination(grsec); };
log { source(kernsrc); filter(f_audit); destination(audit); };
log { source(kernsrc); filter(f_avc); destination(avc); };
log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); };
log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };
log { source(src); filter(f_news); filter(f_crit); destination(newscrit); };
log { source(src); filter(f_news); filter(f_err); destination(newserr); };
log { source(src); filter(f_news); filter(f_notice); destination(newsnotice); };
log { source(src); filter(f_debug); destination(debug); };
log { source(src); filter(f_messages); destination(messages); };
log { source(src); filter(f_emergency); destination(console); };
#log { source(src); filter(f_ppp); destination(ppp); };
log { source(src); destination(console_all); };



1.1                  app-admin/syslog-ng/files/3.4/syslog-ng.confd

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.confd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng.confd?rev=1.1&content-type=text/plain

Index: syslog-ng.confd
===================================================================
# Config file for /etc/init.d/syslog-ng

# If you are not using network logging, this entire section should be
# commented out. Otherwise, choose one of the settings below based on
# how you are configuring your network.
#
# If you are using the net.* scripts to configure your network, you should
# set rc_need to match the interface through which your logging server
# can be reached.
#rc_need="net.eth0"
#
# If you are using an interface manager like wicd, dhcpcd in standalone
# mode, networkmanager, etc to control your interfaces, set rc_need to
# the name of that service.
# rc_need="dhcpcd"
#rc_need="networkmanager"
#
# If you are using newnet and configuring your interface statically with
# the network script, you should use this setting.
#rc_need="network"
#
# You can use this setting, but I do not recommend relying on it.
#rc_need="net"
#
# You may also want to uncomment the following if you are using network
# logging.
#rc_use="stunnel"

# For very customized setups these variables can be adjusted as needed
# but for most situations they should remain commented:
# SYSLOG_NG_CONFIGFILE=/etc/syslog-ng/syslog-ng.conf
# SYSLOG_NG_STATEFILE_DIR=/var/lib/syslog-ng
# SYSLOG_NG_STATEFILE=${SYSLOG_NG_STATEFILE_DIR}/syslog-ng.persist
# SYSLOG_NG_PIDFILE_DIR=/var/run
# SYSLOG_NG_PIDFILE=${SYSLOG_NG_PIDFILE_DIR}/syslog-ng.pid
# SYSLOG_NG_GROUP=root
# SYSLOG_NG_USER=root

# Put any additional options for syslog-ng here.
# See syslog-ng(8) for more information.

SYSLOG_NG_OPTS=""



1.1                  app-admin/syslog-ng/files/3.4/syslog-ng-3.4.1-rollup.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng-3.4.1-rollup.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-admin/syslog-ng/files/3.4/syslog-ng-3.4.1-rollup.patch?rev=1.1&content-type=text/plain

Index: syslog-ng-3.4.1-rollup.patch
===================================================================
diff -ru syslog-ng-3.4.1/contrib/systemd/syslog-ng.service syslog-ng-3.4-master/contrib/systemd/syslog-ng.service
--- syslog-ng-3.4.1/contrib/systemd/syslog-ng.service	2013-01-06 15:38:58.000000000 -0500
+++ syslog-ng-3.4-master/contrib/systemd/syslog-ng.service	2013-04-16 10:11:23.000000000 -0400
@@ -7,6 +7,7 @@
 ExecStart=/usr/sbin/syslog-ng -F
 ExecReload=/bin/kill -HUP $MAINPID
 StandardOutput=null
+Restart=on-failure
 
 [Install]
 WantedBy=multi-user.target
diff -ru syslog-ng-3.4.1/lib/cfg-tree.c syslog-ng-3.4-master/lib/cfg-tree.c
--- syslog-ng-3.4.1/lib/cfg-tree.c	2013-01-06 15:40:30.000000000 -0500
+++ syslog-ng-3.4-master/lib/cfg-tree.c	2013-04-16 10:11:23.000000000 -0400
@@ -588,6 +588,22 @@
   return FALSE;
 }
 
+static void
+cfg_tree_propagate_expr_node_properties_to_pipe(LogExprNode *node, LogPipe *pipe)
+{
+  if (node->flags & LC_FALLBACK)
+    pipe->flags |= PIF_BRANCH_FALLBACK;
+
+  if (node->flags & LC_FINAL)
+    pipe->flags |= PIF_BRANCH_FINAL;
+
+  if (node->flags & LC_FLOW_CONTROL)
+    pipe->flags |= PIF_HARD_FLOW_CONTROL;
+
+  if (!pipe->expr_node)
+    pipe->expr_node = node;
+}
+
 /**
  * cfg_tree_compile_sequence:
  *
@@ -713,10 +729,6 @@
             {
               source_join_pipe = last_pipe = log_pipe_new();
               g_ptr_array_add(self->initialized_pipes, source_join_pipe);
-
-              source_join_pipe->expr_node = node;
-              if (node->flags & LC_FLOW_CONTROL)
-                source_join_pipe->flags |= PIF_HARD_FLOW_CONTROL;
             }
           log_pipe_append(sub_pipe_tail, source_join_pipe);
         }
@@ -724,16 +736,13 @@
 
   if (first_pipe)
     {
-      if (node->flags & LC_FALLBACK)
-        first_pipe->flags |= PIF_BRANCH_FALLBACK;
-
-      if (node->flags & LC_FINAL)
-        first_pipe->flags |= PIF_BRANCH_FINAL;
-
-      if (node->flags & LC_FLOW_CONTROL)
-        first_pipe->flags |= PIF_HARD_FLOW_CONTROL;
-      if (!first_pipe->expr_node)
-        first_pipe->expr_node = node;
+      /* we actually return something as sub_pipe_head, which means that we
+       * have to propagate flags upwards */
+      cfg_tree_propagate_expr_node_properties_to_pipe(node, first_pipe);
+    }
+  else if (last_pipe)
+    {
+      cfg_tree_propagate_expr_node_properties_to_pipe(node, last_pipe);
     }
 
 
diff -ru syslog-ng-3.4.1/lib/control.c syslog-ng-3.4-master/lib/control.c
--- syslog-ng-3.4.1/lib/control.c	2013-01-06 15:40:30.000000000 -0500
+++ syslog-ng-3.4-master/lib/control.c	2013-04-16 10:11:23.000000000 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002-2012 BalaBit IT Ltd, Budapest, Hungary
+ * Copyright (c) 2002-2013 BalaBit IT Ltd, Budapest, Hungary
  * Copyright (c) 1998-2012 Balázs Scheidler
  *
  * This library is free software; you can redistribute it and/or
@@ -208,8 +208,8 @@
     }
   else if (rc == 0)
     {
-      msg_error("EOF on control channel, closing connection",
-                NULL);
+      msg_notice("EOF on control channel, closing connection",
+                 NULL);
       goto destroy_connection;
     }
   else
diff -ru syslog-ng-3.4.1/lib/filter.c syslog-ng-3.4-master/lib/filter.c
--- syslog-ng-3.4.1/lib/filter.c	2013-01-06 15:40:30.000000000 -0500
+++ syslog-ng-3.4-master/lib/filter.c	2013-04-16 10:11:23.000000000 -0400
@@ -46,6 +46,12 @@
   self->ref_cnt = 1;
 }
 
+/*
+ * In case the filter would modify the message the caller has to make sure
+ * that the message is writable.  You can always archieve that with
+ * filter_expr_eval_root() below, but you have to be on a processing path to
+ * do that.
+ */
 gboolean
 filter_expr_eval_with_context(FilterExprNode *self, LogMessage **msg, gint num_msg)
 {
@@ -65,6 +71,21 @@
   return filter_expr_eval_with_context(self, &msg, 1);
 }
 
+gboolean
+filter_expr_eval_root_with_context(FilterExprNode *self, LogMessage **msg, gint num_msg, const LogPathOptions *path_options)
+{
+  if (self->modify)
+    log_msg_make_writable(&msg[0], path_options);
+
+  return filter_expr_eval_with_context(self, msg, num_msg);
+}
+
+gboolean
+filter_expr_eval_root(FilterExprNode *self, LogMessage **msg, const LogPathOptions *path_options)
+{
+  return filter_expr_eval_root_with_context(self, msg, 1, path_options);
+}
+
 FilterExprNode *
 filter_expr_ref(FilterExprNode *self)
 {
@@ -98,6 +119,7 @@
     self->left->init(self->left, cfg);
   if (self->right && self->right->init)
     self->right->init(self->right, cfg);
+  self->super.modify = self->left->modify || self->right->modify;
 }
 
 static void
@@ -132,7 +154,6 @@
   
   fop_init_instance(self);
   self->super.eval = fop_or_eval;
-  self->super.modify = e1->modify || e2->modify;
   self->left = e1;
   self->right = e2;
   self->super.type = "OR";
@@ -154,7 +175,6 @@
   
   fop_init_instance(self);
   self->super.eval = fop_and_eval;
-  self->super.modify = e1->modify || e2->modify;
   self->left = e1;
   self->right = e2;
   self->super.type = "AND";
@@ -509,6 +529,7 @@
 
 
       self->filter_expr = ((LogFilterPipe *) rule->children->object)->expr;
+      self->super.modify = self->filter_expr->modify;
     }
   else
     {
@@ -699,10 +720,8 @@
             evt_tag_str("rule", self->name),
             evt_tag_str("location", log_expr_node_format_location(s->expr_node, buf, sizeof(buf))),
             NULL);
-  if (self->expr->modify)
-    log_msg_make_writable(&msg, path_options);
 
-  res = filter_expr_eval(self->expr, msg);
+  res = filter_expr_eval_root(self->expr, &msg, path_options);
   msg_debug("Filter rule evaluation result",
             evt_tag_str("result", res ? "match" : "not-match"),
             evt_tag_str("rule", self->name),
diff -ru syslog-ng-3.4.1/lib/filter.h syslog-ng-3.4-master/lib/filter.h
--- syslog-ng-3.4.1/lib/filter.h	2013-01-06 15:40:30.000000000 -0500
+++ syslog-ng-3.4-master/lib/filter.h	2013-04-16 10:11:23.000000000 -0400
@@ -48,6 +48,8 @@
 
 gboolean filter_expr_eval(FilterExprNode *self, LogMessage *msg);
 gboolean filter_expr_eval_with_context(FilterExprNode *self, LogMessage **msgs, gint num_msg);
+gboolean filter_expr_eval_root(FilterExprNode *self, LogMessage **msg, const LogPathOptions *path_options);
+gboolean filter_expr_eval_root_with_context(FilterExprNode *self, LogMessage **msgs, gint num_msg, const LogPathOptions *path_options);
 void filter_expr_unref(FilterExprNode *self);
 
 typedef struct _FilterRE
diff -ru syslog-ng-3.4.1/lib/logmpx.c syslog-ng-3.4-master/lib/logmpx.c
--- syslog-ng-3.4.1/lib/logmpx.c	2013-01-06 15:40:30.000000000 -0500
+++ syslog-ng-3.4-master/lib/logmpx.c	2013-04-16 10:11:23.000000000 -0400
@@ -39,9 +39,15 @@
   
   for (i = 0; i < self->next_hops->len; i++)
     {
-      LogPipe *next_hop = g_ptr_array_index(self->next_hops, i);
+      LogPipe *branch_head = g_ptr_array_index(self->next_hops, i);
+      LogPipe *p;
+
+      for (p = branch_head; p; p = p->pipe_next)
+        {
+          branch_head->flags |= (p->flags & PIF_BRANCH_PROPERTIES);
+        }
           
-      if ((next_hop->flags & PIF_BRANCH_FALLBACK) != 0)
+      if (branch_head->flags & PIF_BRANCH_FALLBACK)
         {
           self->fallback_exists = TRUE;
         }
diff -ru syslog-ng-3.4.1/lib/logmsg.h syslog-ng-3.4-master/lib/logmsg.h
--- syslog-ng-3.4.1/lib/logmsg.h	2013-01-06 15:40:30.000000000 -0500
+++ syslog-ng-3.4-master/lib/logmsg.h	2013-04-16 10:11:23.000000000 -0400
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2002-2012 BalaBit IT Ltd, Budapest, Hungary
- * Copyright (c) 1998-2012 Balázs Scheidler
+ * Copyright (c) 2002-2013 BalaBit IT Ltd, Budapest, Hungary
+ * Copyright (c) 1998-2013 Balázs Scheidler
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -203,6 +203,12 @@
 gboolean log_msg_is_handle_sdata(NVHandle handle);
 gboolean log_msg_is_handle_match(NVHandle handle);
 
+static inline gboolean
+log_msg_is_handle_settable_with_an_indirect_value(NVHandle handle)
+{
+  return (handle >= LM_V_MAX);
+}
+
 const gchar *log_msg_get_macro_value(LogMessage *self, gint id, gssize *value_len);
 
 static inline const gchar *
diff -ru syslog-ng-3.4.1/lib/logpipe.h syslog-ng-3.4-master/lib/logpipe.h
--- syslog-ng-3.4.1/lib/logpipe.h	2013-01-06 15:40:30.000000000 -0500
+++ syslog-ng-3.4-master/lib/logpipe.h	2013-04-16 10:11:23.000000000 -0400
@@ -47,6 +47,7 @@
 /* log statement flags that are copied to the head of a branch */
 #define PIF_BRANCH_FINAL      0x0004
 #define PIF_BRANCH_FALLBACK   0x0008
+#define PIF_BRANCH_PROPERTIES (PIF_BRANCH_FINAL + PIF_BRANCH_FALLBACK)
 
 /* branch starting with this pipe wants hard flow control */
 #define PIF_HARD_FLOW_CONTROL 0x0010
diff -ru syslog-ng-3.4.1/lib/logrewrite.c syslog-ng-3.4-master/lib/logrewrite.c
--- syslog-ng-3.4.1/lib/logrewrite.c	2013-01-31 01:58:05.000000000 -0500
+++ syslog-ng-3.4-master/lib/logrewrite.c	2013-04-16 10:11:23.000000000 -0400
@@ -45,7 +45,7 @@
   gssize length;
   const gchar *value;
 
-  if (self->condition && !filter_expr_eval(self->condition, msg))
+  if (self->condition && !filter_expr_eval_root(self->condition, &msg, path_options))
     {
       msg_debug("Rewrite condition unmatched, skipping rewrite",
                 evt_tag_str("value", log_msg_get_value_name(self->value_handle, NULL)),
diff -ru syslog-ng-3.4.1/lib/persist-state.c syslog-ng-3.4-master/lib/persist-state.c
--- syslog-ng-3.4.1/lib/persist-state.c	2013-01-06 15:40:30.000000000 -0500
+++ syslog-ng-3.4-master/lib/persist-state.c	2013-04-28 00:43:29.703864600 -0400
@@ -26,6 +26,7 @@
 #include "serialize.h"
 #include "messages.h"
 #include "mainloop.h"
+#include "misc.h"
 
 #include <sys/types.h>
 #include <unistd.h>
@@ -218,6 +219,7 @@
                 NULL);
       return FALSE;
     }
+  g_fd_set_cloexec(self->fd, TRUE);
   self->current_key_block = offsetof(PersistFileHeader, initial_key_store);
   self->current_key_ofs = 0;
   self->current_key_size = sizeof((((PersistFileHeader *) NULL))->initial_key_store);
diff -ru syslog-ng-3.4.1/modules/dbparser/patterndb.c syslog-ng-3.4-master/modules/dbparser/patterndb.c
--- syslog-ng-3.4.1/modules/dbparser/patterndb.c	2013-01-17 06:43:50.000000000 -0500
+++ syslog-ng-3.4-master/modules/dbparser/patterndb.c	2013-04-16 10:11:23.000000000 -0400
@@ -1302,7 +1302,7 @@
           log_msg_set_value(msg, match->handle, match->match, match->len);
           g_free(match->match);
         }
-      else if (ref_handle != LM_V_NONE)
+      else if (ref_handle != LM_V_NONE && log_msg_is_handle_settable_with_an_indirect_value(match->handle))
         {
           log_msg_set_value_indirect(msg, match->handle, ref_handle, match->type, match->ofs, match->len);
         }
diff -ru syslog-ng-3.4.1/tests/loggen/loggen.c syslog-ng-3.4-master/tests/loggen/loggen.c
--- syslog-ng-3.4.1/tests/loggen/loggen.c	2013-01-06 15:38:59.000000000 -0500
+++ syslog-ng-3.4-master/tests/loggen/loggen.c	2013-04-16 10:11:23.000000000 -0400
@@ -847,6 +847,12 @@
     {
       static struct sockaddr_un saun;
 
+      if (argc < 1)
+        {
+          fprintf(stderr, "No target path specified\n");
+          return 1;
+        }
+
       saun.sun_family = AF_UNIX;
       strncpy(saun.sun_path, argv[0], sizeof(saun.sun_path));
 





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-28  4:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-28  4:50 [gentoo-commits] gentoo-x86 commit in app-admin/syslog-ng/files/3.4: syslog-ng.rc6 syslog-ng.conf.gentoo.fbsd syslog-ng.conf.gentoo syslog-ng.conf.gentoo.hardened syslog-ng.confd syslog-ng-3.4.1-rollup.patch Michael Sterrett (mr_bones_)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox