From b92d38f075907727dacabbc7d22c66b795a2cbf8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 2 May 2005 22:02:57 +0000 Subject: Update the gcc-inline patch by Dave Stahl #80969 and fix lazy bindings for setuid apps #77526. Package-Manager: portage-2.0.51.21 --- net-misc/iputils/ChangeLog | 10 +- net-misc/iputils/Manifest | 17 +-- net-misc/iputils/files/021109-gcc34.patch | 20 --- .../iputils/files/iputils-021109-bindnow.patch | 16 +++ net-misc/iputils/files/iputils-021109-gcc34.patch | 134 +++++++++++++++++++++ net-misc/iputils/iputils-021109-r3.ebuild | 41 +++---- 6 files changed, 180 insertions(+), 58 deletions(-) delete mode 100644 net-misc/iputils/files/021109-gcc34.patch create mode 100644 net-misc/iputils/files/iputils-021109-bindnow.patch create mode 100644 net-misc/iputils/files/iputils-021109-gcc34.patch (limited to 'net-misc') diff --git a/net-misc/iputils/ChangeLog b/net-misc/iputils/ChangeLog index 12a2378001eb..7da66b4a9b71 100644 --- a/net-misc/iputils/ChangeLog +++ b/net-misc/iputils/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/iputils -# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.37 2005/01/19 01:09:46 vapier Exp $ +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.38 2005/05/02 22:02:57 vapier Exp $ + + 02 May 2005; Mike Frysinger + +files/iputils-021109-bindnow.patch, -files/021109-gcc34.patch, + +files/iputils-021109-gcc34.patch, iputils-021109-r3.ebuild: + Update the gcc-inline patch by Dave Stahl #80969 and fix lazy bindings for + setuid apps #77526. 18 Jan 2005; Mike Frysinger -files/iputils-021109-pfkey.patch, iputils-021109-r3.ebuild: diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest index 4a75ce16daf9..72311bc97d20 100644 --- a/net-misc/iputils/Manifest +++ b/net-misc/iputils/Manifest @@ -1,20 +1,11 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 11e6020fc82bd6316b4a1c824a739261 ChangeLog 5558 -MD5 52f0eaba82a301b9eb4fd3cec7e9b08f iputils-021109-r3.ebuild 2262 +MD5 e209e637c721ca8a26f06994eea4544e ChangeLog 5837 +MD5 03c84da14eb6c55117b11d61a5ac4e1e iputils-021109-r3.ebuild 2336 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 MD5 d85216426f34d4e768ab8f9f48c66e4f files/021109-syserror.patch 324 +MD5 e5bfab718c4dbfe351c8220e20b6052d files/iputils-021109-bindnow.patch 511 MD5 c11c8762616b29e6d556a147aaa9374a files/021109-no-pfkey-search.patch 307 -MD5 2baac2d4f1c8f01957aaaf6b6349c203 files/021109-gcc34.patch 347 MD5 66a524e27160410a2dbaef8d2eed5365 files/digest-iputils-021109-r3 73 MD5 79de65b9da536090d0560ba51520fd9d files/iputils-021109-linux-udp-header.patch 418 MD5 c9986b4299c200260da8f025c5e4b0ea files/021109-ipg-linux-2.6.patch 981 MD5 b4615612d4514f12b35fbaf27d3e04fe files/021109-uclibc-no-ether_ntohost.patch 635 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.9.14 (GNU/Linux) - -iD8DBQFB8EpcroRuSHgZdywRAi96AJ0UuPeR2j3wiWjFYCLja1SEcjRvQwCeKFUV -fqmL5l/INbdiXZkwUxZE/sA= -=+fBu ------END PGP SIGNATURE----- +MD5 744f2999dcf0fc5fd25ffcfeedd574d9 files/iputils-021109-gcc34.patch 2313 diff --git a/net-misc/iputils/files/021109-gcc34.patch b/net-misc/iputils/files/021109-gcc34.patch deleted file mode 100644 index 6803da142523..000000000000 --- a/net-misc/iputils/files/021109-gcc34.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- tracepath.c.old 2004-04-24 01:28:35.380572520 +0100 -+++ tracepath.c 2004-04-24 01:44:07.649846048 +0100 -@@ -227,7 +227,6 @@ - - memset(sndbuf,0,mtu); - --restart: - for (i=0; i<10; i++) { - int res; - -@@ -243,7 +242,8 @@ - if (res==0) - return 0; - if (res > 0) -- goto restart; -+ i = 0; -+ continue; - } - hisptr = (hisptr + 1)&63; - diff --git a/net-misc/iputils/files/iputils-021109-bindnow.patch b/net-misc/iputils/files/iputils-021109-bindnow.patch new file mode 100644 index 000000000000..469418b2036a --- /dev/null +++ b/net-misc/iputils/files/iputils-021109-bindnow.patch @@ -0,0 +1,16 @@ +Since these binaries are going to be setuid root, we want +don't want to allow lazy bindings, otherwise we allow some +information leakage. + +http://bugs.gentoo.org/77526 + +--- Makefile ++++ Makefile +@@ -39,3 +39,7 @@ + ping: ping.o ping_common.o ++ $(LINK.o) $^ $(LDLIBS) -o $@ -Wl,-z,now -Wl,-z,relro + ping6: ping6.o ping_common.o ++ $(LINK.o) $^ $(LDLIBS) -o $@ -Wl,-z,now -Wl,-z,relro ++traceroute6: traceroute6.o ++ $(LINK.o) $^ $(LDLIBS) -o $@ -Wl,-z,now -Wl,-z,relro + ping.o ping6.o ping_common.o: ping_common.h diff --git a/net-misc/iputils/files/iputils-021109-gcc34.patch b/net-misc/iputils/files/iputils-021109-gcc34.patch new file mode 100644 index 000000000000..98e1c6eb960f --- /dev/null +++ b/net-misc/iputils/files/iputils-021109-gcc34.patch @@ -0,0 +1,134 @@ +iputils has a lot of ugly goto's that break when using +large gcc inline-limits. + +Fixes by Robert Moss and Dave Stahl +http://bugs.gentoo.org/49241 +http://bugs.gentoo.org/80969 + +--- iputils/tracepath.c ++++ iputils/tracepath.c +@@ -76,7 +76,7 @@ + int progress = -1; + int broken_router; + +-restart: ++ while (1) { + memset(&rcvbuf, -1, sizeof(rcvbuf)); + iov.iov_base = &rcvbuf; + iov.iov_len = sizeof(rcvbuf); +@@ -93,7 +93,7 @@ + if (res < 0) { + if (errno == EAGAIN) + return progress; +- goto restart; ++ continue; + } + + progress = mtu; +@@ -216,7 +216,7 @@ + perror("NET ERROR"); + return 0; + } +- goto restart; ++ } + } + + int probe_ttl(int fd, int ttl) +@@ -227,7 +227,6 @@ + + memset(sndbuf,0,mtu); + +-restart: + for (i=0; i<10; i++) { + int res; + +@@ -243,7 +242,8 @@ + if (res==0) + return 0; + if (res > 0) +- goto restart; ++ i = 0; ++ continue; + } + hisptr = (hisptr + 1)&63; + +--- iputils/tracepath6.c ++++ iputils/tracepath6.c +@@ -66,7 +66,7 @@ + int progress = -1; + int broken_router; + +-restart: ++ while (1) { + memset(&rcvbuf, -1, sizeof(rcvbuf)); + iov.iov_base = &rcvbuf; + iov.iov_len = sizeof(rcvbuf); +@@ -83,7 +83,7 @@ + if (res < 0) { + if (errno == EAGAIN) + return progress; +- goto restart; ++ continue; + } + + progress = 2; +@@ -222,34 +222,29 @@ + perror("NET ERROR"); + return 0; + } +- goto restart; ++ } + } + + int probe_ttl(int fd, int ttl) + { +- int i; ++ int i=0, res; + char sndbuf[mtu]; + struct probehdr *hdr = (struct probehdr*)sndbuf; + +-restart: +- +- for (i=0; i<10; i++) { +- int res; +- +- hdr->ttl = ttl; +- gettimeofday(&hdr->tv, NULL); +- if (send(fd, sndbuf, mtu-overhead, 0) > 0) +- break; +- res = recverr(fd, ttl); +- if (res==0) +- return 0; +- if (res > 0) +- goto restart; +- } +- +- if (i<10) { +- int res; +- ++ while (i<10) { ++ for (i=0; i<10; i++) { ++ hdr->ttl = ttl; ++ gettimeofday(&hdr->tv, NULL); ++ if (send(fd, sndbuf, mtu-overhead, 0) > 0) ++ break; ++ res = recverr(fd, ttl); ++ if (res==0) ++ return 0; ++ if (res > 0) { ++ i = 0; ++ continue; ++ } ++ } + data_wait(fd); + if (recv(fd, sndbuf, sizeof(sndbuf), MSG_DONTWAIT) > 0) { + printf("%2d?: reply received 8)\n", ttl); +@@ -257,7 +252,7 @@ + } + res = recverr(fd, ttl); + if (res == 1) +- goto restart; ++ continue; + return res; + } + diff --git a/net-misc/iputils/iputils-021109-r3.ebuild b/net-misc/iputils/iputils-021109-r3.ebuild index 27193e45ca56..14afb58b0af8 100644 --- a/net-misc/iputils/iputils-021109-r3.ebuild +++ b/net-misc/iputils/iputils-021109-r3.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-021109-r3.ebuild,v 1.20 2005/01/21 00:17:30 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-021109-r3.ebuild,v 1.21 2005/05/02 22:02:57 vapier Exp $ -inherit flag-o-matic gnuconfig eutils toolchain-funcs +inherit flag-o-matic eutils toolchain-funcs DESCRIPTION="Network monitoring tools including ping and ping6" HOMEPAGE="ftp://ftp.inr.ac.ru/ip-routing" @@ -14,35 +14,30 @@ SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc x86" IUSE="static ipv6 uclibc doc" -DEPEND="virtual/libc - virtual/os-headers - dev-libs/openssl - sys-devel/autoconf +DEPEND="virtual/os-headers doc? ( app-text/openjade dev-perl/SGMLSpm app-text/docbook-sgml-dtd app-text/docbook-sgml-utils )" -RDEPEND="virtual/libc" +RDEPEND="" S=${WORKDIR}/${PN} src_unpack() { unpack ${A} - cd ${S} - - use static && append-ldflags -static - - epatch ${FILESDIR}/${PV}-gcc34.patch - epatch ${FILESDIR}/${PV}-no-pfkey-search.patch - epatch ${FILESDIR}/${PV}-ipg-linux-2.6.patch #71756 - epatch ${FILESDIR}/${PV}-syserror.patch - epatch ${FILESDIR}/${PV}-uclibc-no-ether_ntohost.patch - + cd "${S}" + epatch "${FILESDIR}"/${P}-gcc34.patch + epatch "${FILESDIR}"/${PV}-no-pfkey-search.patch + epatch "${FILESDIR}"/${PV}-ipg-linux-2.6.patch #71756 + epatch "${FILESDIR}"/${PV}-syserror.patch + epatch "${FILESDIR}"/${PV}-uclibc-no-ether_ntohost.patch + epatch "${FILESDIR}"/${P}-bindnow.patch #77526 # make iputils work with newer glibc snapshots - epatch ${FILESDIR}/${P}-linux-udp-header.patch + epatch "${FILESDIR}"/${P}-linux-udp-header.patch + use static && append-ldflags -static sed -i \ -e "/^CCOPT=/s:-O2:${CFLAGS}:" \ -e "/^CC=/s:.*::" \ @@ -69,16 +64,16 @@ src_compile() { src_install() { into / - dobin ping + dobin ping || die "ping" use ipv6 && dobin ping6 - dosbin arping + dosbin arping || die "arping" into /usr - dosbin tracepath + dosbin tracepath || die "tracepath" use ipv6 && dosbin trace{path,route}6 - dosbin clockdiff rarpd rdisc ipg tftpd + dosbin clockdiff rarpd rdisc ipg tftpd || die "misc sbin" fperms 4711 /bin/ping - use ipv6 && fperms 4711 /bin/ping6 + use ipv6 && fperms 4711 /bin/ping6 /usr/sbin/traceroute6 dodoc INSTALL RELNOTES -- cgit v1.2.3-65-gdbad