Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5d0d6c09cb | ||
|
176fea62b8 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ syslog-ng_3.1.1.tar.gz
|
||||
/syslog-ng-3.2.3-20110424.tar.bz2
|
||||
/syslog-ng_3.2.3.tar.gz
|
||||
/syslog-ng_3.2.4.tar.gz
|
||||
/syslog-ng_3.2.5.tar.gz
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
5995f7dad0053a478b60a63f6f754203 syslog-ng_3.2.4.tar.gz
|
||||
60737452ce898f9dc7170dfdc9bfd732 syslog-ng_3.2.5.tar.gz
|
||||
|
@ -1,29 +0,0 @@
|
||||
From: Balazs Scheidler <bazsi@balabit.hu>
|
||||
Date: Mon, 27 Jun 2011 07:47:51 +0000 (+0200)
|
||||
Subject: fixed chain-hostnames() processing
|
||||
X-Git-Url: http://git.balabit.hu/?p=bazsi%2Fsyslog-ng-3.2.git;a=commitdiff_plain;h=2db971fc37471e39f6a8b34595ca23833166831e
|
||||
|
||||
fixed chain-hostnames() processing
|
||||
|
||||
The marking of local messages was broken, and as a result hostnames generated
|
||||
by chain-hostnames(yes) got also broken: instead of <source>@<hostname>
|
||||
<hostname>/<hostname> got generated.
|
||||
|
||||
Reported-By: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
|
||||
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
|
||||
---
|
||||
|
||||
diff --git a/lib/logreader.c b/lib/logreader.c
|
||||
index 7508abf..400668a 100644
|
||||
--- a/lib/logreader.c
|
||||
+++ b/lib/logreader.c
|
||||
@@ -280,6 +280,9 @@ log_reader_handle_line(LogReader *self, const guchar *line, gint length, GSockAd
|
||||
m = log_msg_new((gchar *) line, length,
|
||||
saddr,
|
||||
&self->options->parse_options);
|
||||
+
|
||||
+ if (self->options->flags & LR_LOCAL)
|
||||
+ m->flags |= LF_LOCAL;
|
||||
|
||||
if (!m->saddr && self->peer_addr)
|
||||
{
|
@ -1,19 +0,0 @@
|
||||
diff -ruN syslog-ng-3.2.4/tests/functional/func_test.py syslog-ng-3.2.4-modified/tests/functional/func_test.py
|
||||
--- syslog-ng-3.2.4/tests/functional/func_test.py 2010-07-09 11:19:27.000000000 +0100
|
||||
+++ syslog-ng-3.2.4-modified/tests/functional/func_test.py 2011-05-12 03:23:48.276226460 +0100
|
||||
@@ -60,11 +60,12 @@
|
||||
# import test modules
|
||||
import test_file_source
|
||||
import test_filters
|
||||
-import test_input_drivers
|
||||
+#import test_input_drivers
|
||||
import test_performance
|
||||
-import test_sql
|
||||
+#import test_sql
|
||||
|
||||
-tests = (test_input_drivers, test_sql, test_file_source, test_filters, test_performance)
|
||||
+#tests = (test_input_drivers, test_sql, test_file_source, test_filters, test_performance)
|
||||
+tests = (test_file_source, test_filters, test_performance)
|
||||
|
||||
init_env()
|
||||
seed_rnd()
|
14
syslog-ng-3.2.5-syslog-ng.service.patch
Normal file
14
syslog-ng-3.2.5-syslog-ng.service.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -ruN syslog-ng-3.2.5/contrib/systemd/syslog-ng.service syslog-ng-3.2.5-modified/contrib/systemd/syslog-ng.service
|
||||
--- syslog-ng-3.2.5/contrib/systemd/syslog-ng.service 2011-10-23 07:48:18.000000000 +0100
|
||||
+++ syslog-ng-3.2.5-modified/contrib/systemd/syslog-ng.service 2011-11-01 19:30:09.446750825 +0000
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
[Service]
|
||||
Sockets=syslog.socket
|
||||
+EnvironmentFile=-/etc/sysconfig/syslog-ng
|
||||
ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service
|
||||
-ExecStart=/usr/sbin/syslog-ng -F
|
||||
+ExecStart=/sbin/syslog-ng $SYSLOGNG_OPTIONS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
StandardOutput=null
|
||||
|
88
syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch
Normal file
88
syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch
Normal file
@ -0,0 +1,88 @@
|
||||
From: Balazs Scheidler <bazsi@balabit.hu>
|
||||
Date: Wed, 14 Dec 2011 14:21:05 +0000 (+0100)
|
||||
Subject: afunix: clarified error messages in case of a failure
|
||||
X-Git-Url: http://git.balabit.hu/?p=bazsi%2Fsyslog-ng-3.3.git;a=commitdiff_plain;h=606c8cc0b10aa4e877f70726b707402d100bb0f9
|
||||
|
||||
afunix: clarified error messages in case of a failure
|
||||
|
||||
On Fedora systems, syslog-ng was configured to use unix-stream() /dev/log
|
||||
whereas systemd supplied a unix-dgram() one, which caused difficult to
|
||||
diagnose problems.
|
||||
|
||||
This patch adds further logging to this case and causes syslog-ng to fail
|
||||
with an error message if it finds that /dev/log is using an incorrect
|
||||
socket type.
|
||||
|
||||
Reported-By: Michal Schmidt <mschmidt@redhat.com>
|
||||
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
|
||||
---
|
||||
|
||||
diff --git a/modules/afsocket/afunix.c b/modules/afsocket/afunix.c
|
||||
index cd86798..8145f1a 100644
|
||||
--- a/modules/afsocket/afunix.c
|
||||
+++ b/modules/afsocket/afunix.c
|
||||
@@ -75,7 +75,7 @@ static gboolean
|
||||
afunix_sd_acquire_socket(AFSocketSourceDriver *s, gint *result_fd)
|
||||
{
|
||||
AFUnixSourceDriver *self = (AFUnixSourceDriver *) s;
|
||||
- gint fd, fds, t, r;
|
||||
+ gint fd, fds;
|
||||
|
||||
*result_fd = -1;
|
||||
fd = -1;
|
||||
@@ -100,13 +100,40 @@ afunix_sd_acquire_socket(AFSocketSourceDriver *s, gint *result_fd)
|
||||
{
|
||||
for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + fds; fd++)
|
||||
{
|
||||
- t = (self->super.flags & AFSOCKET_STREAM) ? SOCK_STREAM : SOCK_DGRAM;
|
||||
- r = sd_is_socket_unix(fd, t, -1, self->filename, 0);
|
||||
- if (r == 1)
|
||||
+ /* check if any type is available */
|
||||
+ if (sd_is_socket_unix(fd, 0, -1, self->filename, 0))
|
||||
{
|
||||
- *result_fd = fd;
|
||||
- break;
|
||||
- }
|
||||
+ int type = (self->super.flags & AFSOCKET_STREAM) ? SOCK_STREAM : SOCK_DGRAM;
|
||||
+
|
||||
+ /* check if it matches our idea of the socket type */
|
||||
+ if (sd_is_socket_unix(fd, type, -1, self->filename, 0))
|
||||
+ {
|
||||
+ *result_fd = fd;
|
||||
+ break;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ msg_error("The systemd supplied UNIX domain socket is of a different type, check the configured driver and the matching systemd unit file",
|
||||
+ evt_tag_str("filename", self->filename),
|
||||
+ evt_tag_int("systemd-sock-fd", fd),
|
||||
+ evt_tag_str("expecting", type == SOCK_STREAM ? "unix-stream()" : "unix-dgram()"),
|
||||
+ NULL);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+
|
||||
+ /* systemd passed an fd we didn't really care about. This is
|
||||
+ * not an error, but might be worth mentioning it at the debug
|
||||
+ * level.
|
||||
+ */
|
||||
+
|
||||
+ msg_debug("Ignoring systemd supplied fd as it is not a UNIX domain socket",
|
||||
+ evt_tag_str("filename", self->filename),
|
||||
+ evt_tag_int("systemd-sock-fd", fd),
|
||||
+ NULL);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -123,7 +150,7 @@ afunix_sd_acquire_socket(AFSocketSourceDriver *s, gint *result_fd)
|
||||
}
|
||||
else
|
||||
{
|
||||
- msg_debug("Failed to acquire systemd socket, opening nevertheless",
|
||||
+ msg_debug("Failed to acquire systemd socket, trying to open ourselves",
|
||||
evt_tag_str("filename", self->filename),
|
||||
NULL);
|
||||
}
|
@ -21,7 +21,7 @@ options {
|
||||
|
||||
source s_sys {
|
||||
file ("/proc/kmsg" program_override("kernel: "));
|
||||
unix-stream ("/dev/log");
|
||||
unix-dgram ("/dev/log");
|
||||
internal();
|
||||
# udp(ip(0.0.0.0) port(514));
|
||||
};
|
||||
|
@ -1,12 +0,0 @@
|
||||
[Unit]
|
||||
Description=Syslog-ng System Logging Service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/sysconfig/syslog-ng
|
||||
ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service
|
||||
ExecStart=/sbin/syslog-ng $SYSLOGNG_OPTIONS
|
||||
Sockets=syslog.socket
|
||||
StandardOutput=null
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -4,8 +4,8 @@
|
||||
%global _libdir /%{_lib}
|
||||
|
||||
Name: syslog-ng
|
||||
Version: 3.2.4
|
||||
Release: 7%{?dist}
|
||||
Version: 3.2.5
|
||||
Release: 2%{?dist}
|
||||
Summary: Next-generation syslog server
|
||||
|
||||
Group: System Environment/Daemons
|
||||
@ -13,12 +13,13 @@ License: GPLv2+
|
||||
Url: http://www.balabit.com/network-security/syslog-ng
|
||||
Source0: http://www.balabit.com/downloads/files?path=/syslog-ng/sources/%{version}/source/%{name}_%{version}.tar.gz
|
||||
Source1: syslog-ng.conf
|
||||
Source2: syslog-ng.service
|
||||
#Source2: syslog-ng.service
|
||||
Source3: syslog-ng.sysconfig
|
||||
Source4: syslog-ng.logrotate
|
||||
|
||||
Patch0: syslog-ng-3.2.4-disable-ssl-tests.patch
|
||||
Patch1: syslog-ng-3.2.4-chain-hostnames-processing.patch
|
||||
Patch1: syslog-ng-3.2.5-syslog-ng.service.patch
|
||||
Patch2: syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
@ -27,7 +28,7 @@ BuildRequires: pkgconfig
|
||||
BuildRequires: libtool
|
||||
BuildRequires: eventlog-devel >= %{evtlog_ver}
|
||||
BuildRequires: glib2-devel >= 2.10.1
|
||||
BuildRequires: libcap-devel
|
||||
#BuildRequires: libcap-devel
|
||||
BuildRequires: libdbi-devel
|
||||
BuildRequires: libnet-devel
|
||||
#BuildRequires: openssl-devel
|
||||
@ -83,6 +84,7 @@ developing applications that use %{name}.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
# fix perl path
|
||||
%{__sed} -i 's|^#!/usr/local/bin/perl|#!%{__perl}|' contrib/relogger.pl
|
||||
@ -104,11 +106,12 @@ developing applications that use %{name}.
|
||||
--localstatedir=%{_sharedstatedir}/%{name} \
|
||||
--datadir=%{_datadir}/%{name} \
|
||||
--with-module-dir=/%{_lib}/%{name} \
|
||||
--with-systemdsystemunitdir=%{_unitdir} \
|
||||
--enable-ipv6 \
|
||||
--enable-tcp-wrapper \
|
||||
--enable-pcre \
|
||||
--enable-spoof-source \
|
||||
--enable-linux-caps \
|
||||
--disable-linux-caps \
|
||||
--enable-sql \
|
||||
--disable-ssl \
|
||||
--enable-shared \
|
||||
@ -130,10 +133,6 @@ make DESTDIR=%{buildroot} install
|
||||
#%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
|
||||
%{__install} -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/syslog-ng.conf
|
||||
|
||||
# install the service script
|
||||
%{__install} -d -m 755 %{buildroot}%{_unitdir}
|
||||
%{__install} -p -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
|
||||
|
||||
%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig
|
||||
%{__install} -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
||||
|
||||
@ -222,7 +221,6 @@ fi
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS COPYING README ChangeLog NEWS
|
||||
%doc doc/security/*.txt
|
||||
%doc doc/examples/syslog-ng.conf.sample
|
||||
%doc contrib/{relogger.pl,syslog2ng,syslog-ng.conf.doc}
|
||||
|
||||
%dir %{_sysconfdir}/%{name}
|
||||
@ -248,6 +246,9 @@ fi
|
||||
%{_datadir}/%{name}/syslog-ng.vim
|
||||
%ghost %{_datadir}/vim/
|
||||
|
||||
# scl files
|
||||
%{_datadir}/%{name}/include/
|
||||
|
||||
# uhm, some better places for those?
|
||||
%{_datadir}/%{name}/xsd/
|
||||
|
||||
@ -264,11 +265,39 @@ fi
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libsyslog-ng.so
|
||||
%{_includedir}/%{name}/
|
||||
# scl files
|
||||
%{_datadir}/%{name}/include/
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Dec 14 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.5-2
|
||||
- Fix the freeze problems caused by the /dev/log unix socket type mismatch (#742624)
|
||||
+ syslog-ng.conf: change /dev/log from unix-stream to unix-dgram
|
||||
+ upstream patch syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch
|
||||
- Move the SCL files to the main RPM (#742624 comments >= 28)
|
||||
|
||||
* Tue Nov 1 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.5-1
|
||||
- Update to 3.2.5
|
||||
|
||||
* Tue Oct 25 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-11
|
||||
- New 3.2.5 pre-release tarball
|
||||
https://lists.balabit.hu/pipermail/syslog-ng/2011-October/017491.html
|
||||
- Updated patch syslog-ng-3.2.5-syslog-ng.service.patch
|
||||
|
||||
* Sat Oct 22 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-10
|
||||
- 3.2.5 pre-release: changelog and tarball from
|
||||
https://lists.balabit.hu/pipermail/syslog-ng/2011-October/017462.html
|
||||
Patches dropped:
|
||||
syslog-ng-3.2.4-systemd-acquired-fd.patch
|
||||
syslog-ng-3.2.4-chain-hostnames-processing.patch
|
||||
- New configure option: --with-systemdsystemunitdir
|
||||
- Patched the included syslog-ng.service file
|
||||
syslog-ng-3.2.5-syslog-ng.service.patch
|
||||
|
||||
* Mon Oct 10 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-9
|
||||
- Patch syslog-ng-3.2.4-systemd-acquired-fd.patch (see bug #742624)
|
||||
|
||||
* Mon Oct 10 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-8
|
||||
- disable linux-caps support for the time being (see bug #718439)
|
||||
|
||||
* Wed Aug 31 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-7
|
||||
- Fixed the syslog-ng.service configuration file:
|
||||
* Sockets setting (#734569)
|
||||
|
Loading…
Reference in New Issue
Block a user