+++ /dev/null
-fixes for settings like owner(), group(), perm() and analogous dir_* if create_dirs=yes
-for destination files
- - CAP_DAC_OVERRIDE force changes if parent dir has 000 perm, ie vservers (is inerhitted for dir_* too)
- - CAP_CHOWN - needed if dir_owner() or dir_group() are in use
- - CAP_FOWNER - to force chmod() for dirs with owner != root
-
-diff -upr syslog-ng-3.0.8./src/affile.c syslog-ng-3.0.8/src/affile.c
---- syslog-ng-3.0.8./src/affile.c 2010-05-05 10:32:49.000000000 +0200
-+++ syslog-ng-3.0.8/src/affile.c 2010-10-08 16:23:41.319089286 +0200
-@@ -55,15 +55,21 @@ affile_open_file(gchar *name, gint flags
- return FALSE;
- }
-
-- if (create_dirs && !create_containing_directory(name, dir_uid, dir_gid, dir_mode))
-- return FALSE;
--
- saved_caps = g_process_cap_save();
- if (privileged)
- {
- g_process_cap_modify(CAP_DAC_READ_SEARCH, TRUE);
- g_process_cap_modify(CAP_SYS_ADMIN, TRUE);
- }
-+ else
-+ g_process_cap_modify(CAP_DAC_OVERRIDE, TRUE);
-+
-+ if (create_dirs && !create_containing_directory(name, dir_uid, dir_gid, dir_mode))
-+ {
-+ g_process_cap_restore(saved_caps);
-+ return FALSE;
-+ }
-+
- *fd = -1;
- if (stat(name, &st) >= 0)
- {
-diff -upr syslog-ng-3.0.8./src/misc.c syslog-ng-3.0.8/src/misc.c
---- syslog-ng-3.0.8./src/misc.c 2010-05-05 11:26:00.000000000 +0200
-+++ syslog-ng-3.0.8/src/misc.c 2010-10-08 16:23:41.319089286 +0200
-@@ -24,6 +24,7 @@
- #include "misc.h"
- #include "dnscache.h"
- #include "messages.h"
-+#include "gprocess.h"
-
- #include <sys/types.h>
- #include <sys/socket.h>
-@@ -352,6 +353,7 @@ create_containing_directory(gchar *name,
- gchar *dirname;
- struct stat st;
- gint rc;
-+ cap_t saved_caps;
-
- /* check that the directory exists */
- dirname = g_path_get_dirname(name);
-@@ -385,12 +387,16 @@ create_containing_directory(gchar *name,
- {
- if (mkdir(name, (mode_t) dir_mode) == -1)
- return FALSE;
-+ saved_caps = g_process_cap_save();
-+ g_process_cap_modify(CAP_CHOWN, TRUE);
-+ g_process_cap_modify(CAP_FOWNER, TRUE);
- if (dir_uid >= 0)
- chown(name, (uid_t) dir_uid, -1);
- if (dir_gid >= 0)
- chown(name, -1, (gid_t) dir_gid);
- if (dir_mode >= 0)
- chmod(name, (mode_t) dir_mode);
-+ g_process_cap_restore(saved_caps);
- }
- *p = '/';
- p = strchr(p + 1, '/');
+++ /dev/null
-fix operations on unix-stream() source
- - CAP_CHOWN - needed if owner() or group() are in use
- - CAP_FOWNER - to force chmod() for sockets with owner != root
- (yes, that enough to switch succession of chown and chmod but who cares)
- - CAP_DAC_OVERRIDE - force changes if parent dir has 000 perm, ie vservers
-
---- syslog-ng-3.0.8/src/afunix.c~ 2010-05-05 11:26:57.000000000 +0200
-+++ syslog-ng-3.0.8/src/afunix.c 2010-09-29 12:46:13.826955835 +0200
-@@ -24,6 +24,7 @@
- #include "afunix.h"
- #include "misc.h"
- #include "messages.h"
-+#include "gprocess.h"
-
- #include <sys/types.h>
- #include <sys/socket.h>
-@@ -65,9 +65,14 @@ static gboolean
- afunix_sd_init(LogPipe *s)
- {
- AFUnixSourceDriver *self = (AFUnixSourceDriver *) s;
-+ cap_t saved_caps;
-
- if (afsocket_sd_init(s))
- {
-+ saved_caps = g_process_cap_save();
-+ g_process_cap_modify(CAP_CHOWN, TRUE);
-+ g_process_cap_modify(CAP_FOWNER, TRUE);
-+ g_process_cap_modify(CAP_DAC_OVERRIDE, TRUE);
- /* change ownership separately, as chgrp may succeed while chown may not */
- if (self->owner >= 0)
- chown(self->filename, (uid_t) self->owner, -1);
-@@ -75,6 +79,7 @@ afunix_sd_init(LogPipe *s)
- chown(self->filename, -1, (gid_t) self->group);
- if (self->perm >= 0)
- chmod(self->filename, (mode_t) self->perm);
-+ g_process_cap_restore(saved_caps);
- return TRUE;
- }
- return FALSE;
-diff -ur syslog-ng-2.0.6.orig/src/syslog-ng.h syslog-ng-2.0.6/src/syslog-ng.h
---- syslog-ng-2.0.6.orig/src/syslog-ng.h 2007-09-22 16:16:15.000000000 +0200
-+++ syslog-ng-2.0.6/src/syslog-ng.h 2007-12-08 08:25:22.000000000 +0100
-@@ -50,9 +50,9 @@
- #define PATH_SYSLOGNG PATH_PREFIX "/libexec/syslog-ng"
+--- syslog-ng-3.2.2/lib/syslog-ng.h~ 2011-01-04 12:57:06.000000000 +0100
++++ syslog-ng-3.2.2/lib/syslog-ng.h 2011-01-17 19:31:46.933293237 +0100
+@@ -47,10 +47,10 @@
+ #define PATH_SYSLOGNG PATH_LIBEXECDIR "/syslog-ng"
#endif
-#define PATH_PERSIST_CONFIG PATH_LOCALSTATEDIR "/syslog-ng.persist"
-#define PATH_QDISK PATH_LOCALSTATEDIR
-#define PATH_PATTERNDB_FILE PATH_LOCALSTATEDIR "/patterndb.xml"
+-#define PATH_XSDDIR PATH_DATADIR "/xsd"
+#define PATH_PERSIST_CONFIG "/var/lib/syslog-ng/syslog-ng.persist"
+#define PATH_QDISK "/var/lib/syslog-ng"
+#define PATH_PATTERNDB_FILE "/var/lib/syslog-ng/patterndb.xml"
++#define PATH_XSDDIR "/var/lib/syslog-ng/xsd"
#define LOG_PRIORITY_LISTEN 0
#define LOG_PRIORITY_READER 0
if test "x$enable_linux_caps" = "xyes" -o "x$enable_linux_caps" = "xauto"; then
AC_CHECK_LIB(cap, cap_set_proc, LIBCAP_LIBS="-lcap")
+--- syslog-ng-3.2.2/modules/dbparser/Makefile.am~ 2011-01-15 17:14:39.000000000 +0100
++++ syslog-ng-3.2.2/modules/dbparser/Makefile.am 2011-01-17 20:06:00.103986725 +0100
+@@ -17,7 +17,7 @@
+ timerwheel.c timerwheel.h \
+ patternize.c patternize.h
+ libsyslog_ng_patterndb_la_LDFLAGS = -no-undefined
+-libsyslog_ng_patterndb_la_LIBADD = @OPENSSL_LIBS@ @DEPS_LIBS@
++libsyslog_ng_patterndb_la_LIBADD = $(top_builddir)/lib/libsyslog-ng.la @OPENSSL_LIBS@ @DEPS_LIBS@
+
+ module_LTLIBRARIES = libdbparser.la
+ libdbparser_la_SOURCES = \
Summary(pl.UTF-8): Syslog-ng - zamiennik syskloga
Summary(pt_BR.UTF-8): Daemon de log nova geração
Name: syslog-ng
-Version: 3.0.9
-Release: 1
+Version: 3.2.2
+Release: 0.1
License: GPL v2
Group: Daemons
Source0: http://www.balabit.com/downloads/files/syslog-ng/sources/%{version}/source/%{name}_%{version}.tar.gz
-# Source0-md5: 481e5dedcf355268bf4c95bddcae9e55
+# Source0-md5: ed8ebe559d52a63fb61e3e2db566643f
Source1: %{name}.init
Source2: %{name}.conf
Source3: %{name}.logrotate
Patch0: %{name}-link.patch
Patch1: %{name}-datadir.patch
Patch2: %{name}-pyssl.patch
-Patch3: fix-unix-stream-caps.patch
-Patch4: fix-dac_override.patch
URL: http://www.balabit.com/products/syslog_ng/
BuildRequires: autoconf >= 2.53
BuildRequires: automake
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p1
-%patch4 -p1
cp -a %{SOURCE4} doc
cp -a %{SOURCE5} contrib/syslog-ng.conf.simple
%build
-%{__aclocal}
+%{__libtoolize}
+%{__aclocal} -I m4
%{__autoconf}
%{__automake}
%configure \
--sysconfdir=%{_sysconfdir}/syslog-ng \
+ --with-module-dir=/%{_lib}/syslog-ng \
--with-timezone-dir=%{_datadir}/zoneinfo \
--with-pidfile-dir=/var/run \
--enable-ssl \
--enable-spoof-source \
--enable-linux-caps \
--enable-pcre \
+ --enable-pacct \
%if %{with sql}
--enable-sql \
%endif
install -d $RPM_BUILD_ROOT{/etc/{init,sysconfig,logrotate.d,rc.d/init.d},%{_sysconfdir}/syslog-ng} \
$RPM_BUILD_ROOT/var/{log,lib/%{name}}
-%{__make} install \
+%{__make} -j1 install \
DESTDIR=$RPM_BUILD_ROOT
install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/syslog-ng