Patch syslog-ng-3.2.4-systemd-acquired-fd.patch (see bug #742624)
This commit is contained in:
parent
192ef47d95
commit
e33c2c0677
29
syslog-ng-3.2.4-systemd-acquired-fd.patch
Normal file
29
syslog-ng-3.2.4-systemd-acquired-fd.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From: Balazs Scheidler <bazsi@balabit.hu>
|
||||
Date: Wed, 22 Jun 2011 10:50:53 +0000 (+0200)
|
||||
Subject: systemd: make sure the acquired fd is in non-blocking mode
|
||||
X-Git-Url: http://git.balabit.hu/?p=bazsi%2Fsyslog-ng-3.2.git;a=commitdiff_plain;h=2f214c4f87d944aa28d53e331a67b1fd88d9840f
|
||||
|
||||
systemd: make sure the acquired fd is in non-blocking mode
|
||||
|
||||
The fd acquired from systemd is in blocking mode, and syslog-ng
|
||||
didn't explicitly set it to non-blocking, causing syslog-ng
|
||||
to stall. This patch changes that, explicitly enables
|
||||
O_NONBLOCK and O_CLOEXEC on systemd acquired fds.
|
||||
|
||||
Reported-By: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
|
||||
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
|
||||
---
|
||||
|
||||
diff --git a/modules/afsocket/afunix.c b/modules/afsocket/afunix.c
|
||||
index cd9c205..9a4e37b 100644
|
||||
--- a/modules/afsocket/afunix.c
|
||||
+++ b/modules/afsocket/afunix.c
|
||||
@@ -108,6 +108,8 @@ afunix_sd_acquire_socket(AFSocketSourceDriver *s, gint *result_fd)
|
||||
|
||||
if (*result_fd != -1)
|
||||
{
|
||||
+ g_fd_set_nonblock(*result_fd, TRUE);
|
||||
+ g_fd_set_cloexec(*result_fd, TRUE);
|
||||
msg_verbose("Acquired systemd socket",
|
||||
evt_tag_str("filename", self->filename),
|
||||
evt_tag_int("systemd-sock-fd", *result_fd),
|
@ -5,7 +5,7 @@
|
||||
|
||||
Name: syslog-ng
|
||||
Version: 3.2.4
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
Summary: Next-generation syslog server
|
||||
|
||||
Group: System Environment/Daemons
|
||||
@ -19,6 +19,7 @@ Source4: syslog-ng.logrotate
|
||||
|
||||
Patch0: syslog-ng-3.2.4-disable-ssl-tests.patch
|
||||
Patch1: syslog-ng-3.2.4-chain-hostnames-processing.patch
|
||||
Patch2: syslog-ng-3.2.4-systemd-acquired-fd.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
@ -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
|
||||
@ -269,6 +271,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* 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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user