Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/xinetd/, sys-apps/xinetd/files/
Date: Tue, 03 Nov 2015 15:08:33
Message-Id: 1446563287.426002bfe2789fb6213fba832c8bfee634d68d02.vapier@gentoo
1 commit: 426002bfe2789fb6213fba832c8bfee634d68d02
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 3 15:02:36 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 3 15:08:07 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=426002bf
7
8 sys-apps/xinetd: add fix from Fedora for CVE-2013-4342 #488158
9
10 sys-apps/xinetd/files/xinetd-2.3.15-creds.patch | 17 ++++++++
11 sys-apps/xinetd/xinetd-2.3.15-r2.ebuild | 55 +++++++++++++++++++++++++
12 2 files changed, 72 insertions(+)
13
14 diff --git a/sys-apps/xinetd/files/xinetd-2.3.15-creds.patch b/sys-apps/xinetd/files/xinetd-2.3.15-creds.patch
15 new file mode 100644
16 index 0000000..39df3ca
17 --- /dev/null
18 +++ b/sys-apps/xinetd/files/xinetd-2.3.15-creds.patch
19 @@ -0,0 +1,17 @@
20 +https://bugs.gentoo.org/488158
21 +
22 +taken from Fedora
23 +
24 +Patch by Thomas Swan <thomas.swan@×××××.com>
25 +
26 +--- a/xinetd/builtins.c
27 ++++ b/xinetd/builtins.c
28 +@@ -695,7 +695,7 @@ static void tcpmux_handler( const struct server *serp )
29 + if( SC_IS_INTERNAL( scp ) ) {
30 + SC_INTERNAL(scp, nserp);
31 + } else {
32 +- exec_server(nserp);
33 ++ child_process(nserp);
34 + }
35 + }
36 +
37
38 diff --git a/sys-apps/xinetd/xinetd-2.3.15-r2.ebuild b/sys-apps/xinetd/xinetd-2.3.15-r2.ebuild
39 new file mode 100644
40 index 0000000..edd9a74
41 --- /dev/null
42 +++ b/sys-apps/xinetd/xinetd-2.3.15-r2.ebuild
43 @@ -0,0 +1,55 @@
44 +# Copyright 1999-2014 Gentoo Foundation
45 +# Distributed under the terms of the GNU General Public License v2
46 +# $Id$
47 +
48 +EAPI="5"
49 +
50 +inherit eutils flag-o-matic systemd toolchain-funcs
51 +
52 +DESCRIPTION="powerful replacement for inetd"
53 +HOMEPAGE="http://www.xinetd.org/"
54 +SRC_URI="http://www.xinetd.org/${P}.tar.gz"
55 +
56 +LICENSE="BSD"
57 +SLOT="0"
58 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
59 +IUSE="perl rpc tcpd"
60 +
61 +DEPEND="tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )
62 + rpc? ( net-libs/libtirpc:= )"
63 +RDEPEND="${DEPEND}
64 + perl? ( dev-lang/perl )"
65 +DEPEND="${DEPEND}
66 + virtual/pkgconfig"
67 +
68 +src_prepare() {
69 + epatch "${FILESDIR}"/${PN}-2.3.14-DESTDIR.patch
70 + epatch "${FILESDIR}"/${PN}-2.3.14-install-contrib.patch
71 + epatch "${FILESDIR}"/${PN}-2.3.14-config.patch
72 + epatch "${FILESDIR}"/${PN}-2.3.15-creds.patch #488158
73 + find -name Makefile.in -exec sed -i 's:\<ar\>:$(AR):' {} +
74 +}
75 +
76 +src_configure() {
77 + if ! use rpc ; then
78 + append-cppflags -DNO_RPC
79 + export ac_cv_header_{rpc_{rpc,rpcent,pmap_clnt},netdb}_h=no
80 + fi
81 + tc-export AR PKG_CONFIG
82 + LIBS=$(${PKG_CONFIG} --libs libtirpc) \
83 + econf \
84 + $(use_with tcpd libwrap) \
85 + --with-loadavg
86 +}
87 +
88 +src_install() {
89 + emake DESTDIR="${ED}" install install-contrib
90 + use perl || rm -f "${ED}"/usr/sbin/xconv.pl
91 +
92 + newinitd "${FILESDIR}"/xinetd.rc6 xinetd
93 + newconfd "${FILESDIR}"/xinetd.confd xinetd
94 + systemd_dounit "${FILESDIR}/${PN}.service"
95 +
96 + newdoc contrib/xinetd.conf xinetd.conf.dist.sample
97 + dodoc AUDIT INSTALL README TODO CHANGELOG
98 +}