# ChangeLog for app-admin/sysklogd
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/ChangeLog,v 1.50 2006/12/31 09:48:29 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/ChangeLog,v 1.51 2006/12/31 10:30:31 vapier Exp $
+
+*sysklogd-1.4.2_pre20061230 (31 Dec 2006)
+
+ 31 Dec 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/sysklogd-1.4.1-ksym-headers.patch,
+ +files/sysklogd-1.4.1-punt-SO_BSDCOMPAT.patch,
+ +sysklogd-1.4.2_pre20061230.ebuild:
+ Update cvs snap and fix building with sanitized kernel headers #154110.
*sysklogd-1.4.2_pre20051017 (31 Dec 2006)
--- /dev/null
+MD5 c3f301297d5b9d40f87e4157653650a4 sysklogd-1.4.1-cvs-20061230.patch.bz2 12584
+RMD160 50dd59916af80b84618b98229cfafc21b547d2c0 sysklogd-1.4.1-cvs-20061230.patch.bz2 12584
+SHA256 4ca2fd34dacd1c10018b6a786c24faa392d6fef57607e240e3bcaf925231e2b2 sysklogd-1.4.1-cvs-20061230.patch.bz2 12584
+MD5 d214aa40beabf7bdb0c9b3c64432c774 sysklogd-1.4.1.tar.gz 81784
+RMD160 5e60f1294c45932915a3dcd1018cdc02d005a3e0 sysklogd-1.4.1.tar.gz 81784
+SHA256 44357e0fae8c8f0e315bf130b4e86a4f96b91d66eeb4e473def4ce8336fff102 sysklogd-1.4.1.tar.gz 81784
--- /dev/null
+--- ksym_mod.c
++++ ksym_mod.c
+@@ -95,14 +95,6 @@
+ #include <sys/fcntl.h>
+ #include <sys/stat.h>
+ #include "module.h"
+-#if !defined(__GLIBC__)
+-#include <linux/time.h>
+-#include <linux/linkage.h>
+-#else /* __GLIBC__ */
+-#include <linux/linkage.h>
+-extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
+-extern int get_kernel_syms __P ((struct kernel_sym *__table));
+-#endif /* __GLIBC__ */
+ #include <stdarg.h>
+ #include <paths.h>
+ #include <linux/version.h>
--- /dev/null
+http://lists.infodrom.org/infodrom-sysklogd/2006/0012.html
+
+--- syslogd.c
++++ syslogd.c
+@@ -1318,15 +1318,6 @@
+ close(fd);
+ return -1;
+ }
+- /* We need to enable BSD compatibility. Otherwise an attacker
+- * could flood our log files by sending us tons of ICMP errors.
+- */
+- if (setsockopt(fd, SOL_SOCKET, SO_BSDCOMPAT, \
+- (char *) &on, sizeof(on)) < 0) {
+- logerror("setsockopt(BSDCOMPAT), suspending inet");
+- close(fd);
+- return -1;
+- }
+ /* We must not block on the network socket, in case a packet
+ * gets lost between select and recv, otherise the process
+ * will stall until the timeout, and other processes trying to
--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sysklogd/sysklogd-1.4.2_pre20061230.ebuild,v 1.1 2006/12/31 10:30:31 vapier Exp $
+
+inherit eutils flag-o-matic
+
+CVS_DATE=${PV#*_pre}
+MY_P=${PN}-1.4.1
+
+DESCRIPTION="Standard log daemons"
+HOMEPAGE="http://www.infodrom.org/projects/sysklogd/"
+SRC_URI="ftp://metalab.unc.edu/pub/Linux/system/daemons/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}-cvs-${CVS_DATE}.patch.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc64 ~sparc ~x86"
+IUSE=""
+RESTRICT="test"
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ sys-apps/debianutils"
+PROVIDE="virtual/logger"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${WORKDIR}"/${MY_P}-cvs-${CVS_DATE}.patch
+
+ epatch "${FILESDIR}"/${MY_P}-accept.patch
+ epatch "${FILESDIR}"/${MY_P}-querymod.patch
+ epatch "${FILESDIR}"/${MY_P}-punt-SO_BSDCOMPAT.patch
+ epatch "${FILESDIR}"/${MY_P}-ksym-headers.patch
+
+ # CAEN/OWL security patches
+ epatch "${FILESDIR}"/${MY_P}-caen-owl-syslogd-bind.diff
+ epatch "${FILESDIR}"/${MY_P}-caen-owl-syslogd-drop-root.diff
+ epatch "${FILESDIR}"/${MY_P}-caen-owl-klogd-drop-root.diff
+
+ append-lfs-flags
+ sed -i \
+ -e "s:-O3:${CFLAGS}:" \
+ Makefile || die "sed CFLAGS"
+}
+
+src_compile() {
+ emake LDFLAGS="${LDFLAGS}" || die
+}
+
+src_install() {
+ dosbin syslogd klogd "${FILESDIR}"/syslogd-listfiles || die "dosbin"
+ doman *.[1-9] "${FILESDIR}"/syslogd-listfiles.8
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/syslog-cron syslog.cron
+ dodoc ANNOUNCE CHANGES MANIFEST NEWS README.1st README.linux
+ dodoc "${FILESDIR}"/syslog.conf
+ insinto /etc
+ doins "${FILESDIR}"/syslog.conf
+ newinitd "${FILESDIR}"/sysklogd.rc6 sysklogd
+ newconfd "${FILESDIR}"/sysklogd.confd sysklogd
+}