summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2004-12-05 19:25:40 +0000
committerNed Ludd <solar@gentoo.org>2004-12-05 19:25:40 +0000
commit4d5a1b283a295e7249eb4c26327d6b5b40ba0145 (patch)
tree8e3ce1609328bd33a77650aaded026f6f507bb27 /dev-libs/dietlibc
parentfix the freakin slot >_< (diff)
downloadgentoo-2-4d5a1b283a295e7249eb4c26327d6b5b40ba0145.tar.gz
gentoo-2-4d5a1b283a295e7249eb4c26327d6b5b40ba0145.tar.bz2
gentoo-2-4d5a1b283a295e7249eb4c26327d6b5b40ba0145.zip
- Fixed misc ssp problems introduced from dietlibc-0.26-r1 -> dietlibc-0.27-r0 which were causing genkernel failures for hardened users. bug #73112
Diffstat (limited to 'dev-libs/dietlibc')
-rw-r--r--dev-libs/dietlibc/ChangeLog6
-rw-r--r--dev-libs/dietlibc/Manifest32
-rw-r--r--dev-libs/dietlibc/dietlibc-0.27.ebuild14
-rw-r--r--dev-libs/dietlibc/files/ssp.c41
4 files changed, 33 insertions, 60 deletions
diff --git a/dev-libs/dietlibc/ChangeLog b/dev-libs/dietlibc/ChangeLog
index 3b88d2da71e4..a21e85f723d9 100644
--- a/dev-libs/dietlibc/ChangeLog
+++ b/dev-libs/dietlibc/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-libs/dietlibc
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/dietlibc/ChangeLog,v 1.38 2004/10/14 10:52:25 gmsoft Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/dietlibc/ChangeLog,v 1.39 2004/12/05 19:25:40 solar Exp $
+
+ 05 Dec 2004; <solar@gentoo.org> files/ssp.c, dietlibc-0.27.ebuild:
+ - Fixed misc ssp problems introduced from dietlibc-0.26-r1 -> dietlibc-0.27-r0
+ which were causing genkernel failures for hardened users. bug #73112
14 Oct 2004; Guy Martin <gmsoft@gentoo.org> dietlibc-0.25.ebuild:
Stable on hppa.
diff --git a/dev-libs/dietlibc/Manifest b/dev-libs/dietlibc/Manifest
index 6982c14e40ff..ecae98239cdb 100644
--- a/dev-libs/dietlibc/Manifest
+++ b/dev-libs/dietlibc/Manifest
@@ -1,27 +1,27 @@
-MD5 9181f34c64b68e5839e9c4088bfc2cd4 ChangeLog 5652
-MD5 3d41aba8c10497c03a05a30e45354fac dietlibc-0.22-r2.ebuild 1671
+MD5 92ee3a5ce823df484a1d6d90044fa07c dietlibc-0.26-r1.ebuild 1933
MD5 8932d3210d2ef48dd92f04163496b435 dietlibc-0.23.ebuild 1768
-MD5 4c9ccfb0fee56c64ef08e51f538c9d9c dietlibc-0.24.ebuild 1523
MD5 0a72108d8cead49d82c9700cba81d7a1 dietlibc-0.25.ebuild 1563
-MD5 92ee3a5ce823df484a1d6d90044fa07c dietlibc-0.26-r1.ebuild 1933
-MD5 8de66752df8ab2859aa5fa2a544a09b7 dietlibc-0.26.ebuild 1573
+MD5 9a634b015f2e13d04568e894a79dcb7b dietlibc-0.27.ebuild 2609
+MD5 3d41aba8c10497c03a05a30e45354fac dietlibc-0.22-r2.ebuild 1671
+MD5 4c9ccfb0fee56c64ef08e51f538c9d9c dietlibc-0.24.ebuild 1523
+MD5 9181f34c64b68e5839e9c4088bfc2cd4 ChangeLog 5652
MD5 6d7429e88eda74e2e5a1d89dcda32c33 metadata.xml 400
-MD5 578cd057459b93fb6aa402493d8f86be dietlibc-0.27.ebuild 2184
-MD5 e33c0d8f3c56f85d1caa98118824fceb files/0.22-dirent-prototype.patch 563
-MD5 2d0f660abd258d75417ef8abd8ab5eb7 files/0.23-dirent-prototype.patch 668
-MD5 2d0f660abd258d75417ef8abd8ab5eb7 files/0.24-dirent-prototype.patch 668
-MD5 02d59156de2a7a0f914dc5769e26cdcf files/0.25-gcc34.patch 3454
-MD5 67b93dd4033c0e66d42b6bade33c73fc files/dietlibc-0.22_xdr_security_fix.patch 5566
-MD5 4713f8664ff94fb53c7696d9204406ed files/dietlibc-0.23-hppa.patch 3954
-MD5 9022467ec4210d62330f0eb1d8c93394 files/dietlibc-0.26-ssp.patch 1632
+MD5 8de66752df8ab2859aa5fa2a544a09b7 dietlibc-0.26.ebuild 1573
MD5 8c25662fd30d966f24ec20ef491075a6 files/dietlibc-sparc64-makefile.patch 499
+MD5 4713f8664ff94fb53c7696d9204406ed files/dietlibc-0.23-hppa.patch 3954
+MD5 d3261ffed6c8fe1dd2ac7dfec135d42b files/ssp.c 3065
MD5 2644f8611fcb7a147ec9ef76eaf5992a files/digest-dietlibc-0.22-r2 66
+MD5 4c8bea996353605b5d0b6184d8836ffe files/digest-dietlibc-0.26-r1 66
+MD5 67b93dd4033c0e66d42b6bade33c73fc files/dietlibc-0.22_xdr_security_fix.patch 5566
+MD5 9022467ec4210d62330f0eb1d8c93394 files/dietlibc-0.26-ssp.patch 1632
+MD5 9247251c0adc5ce1b626d7092ae0c903 files/gcc-33.patch 482
+MD5 2d0f660abd258d75417ef8abd8ab5eb7 files/0.24-dirent-prototype.patch 668
+MD5 2d0f660abd258d75417ef8abd8ab5eb7 files/0.23-dirent-prototype.patch 668
+MD5 e33c0d8f3c56f85d1caa98118824fceb files/0.22-dirent-prototype.patch 563
MD5 b06d21ffc62c7a660a29351e55213a0b files/digest-dietlibc-0.23 66
MD5 11048a235efe4eefcfffc4ccffa60821 files/digest-dietlibc-0.24 66
MD5 a6911c79e510ea03173a809f5d7e6a40 files/digest-dietlibc-0.25 66
MD5 4c8bea996353605b5d0b6184d8836ffe files/digest-dietlibc-0.26 66
-MD5 4c8bea996353605b5d0b6184d8836ffe files/digest-dietlibc-0.26-r1 66
-MD5 9247251c0adc5ce1b626d7092ae0c903 files/gcc-33.patch 482
-MD5 8dcca4f3b79565a3c205dbb0ef2d20bd files/ssp.c 4038
MD5 771865efe3795f379b15c0bb6d61a857 files/digest-dietlibc-0.27 66
+MD5 02d59156de2a7a0f914dc5769e26cdcf files/0.25-gcc34.patch 3454
MD5 ea791631782529db92c7b23198391a7a files/gcc-33-r2.patch 1077
diff --git a/dev-libs/dietlibc/dietlibc-0.27.ebuild b/dev-libs/dietlibc/dietlibc-0.27.ebuild
index 15facdaf0166..363f5f37e660 100644
--- a/dev-libs/dietlibc/dietlibc-0.27.ebuild
+++ b/dev-libs/dietlibc/dietlibc-0.27.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/dietlibc/dietlibc-0.27.ebuild,v 1.1 2004/10/01 21:23:53 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/dietlibc/dietlibc-0.27.ebuild,v 1.2 2004/12/05 19:25:40 solar Exp $
inherit eutils flag-o-matic fixheadtails gcc
@@ -32,19 +32,25 @@ src_unpack() {
# ${FILESDIR}/ssp.c is integrated with upstream as of dietlibc-0.26
# - robbat2 (Oct 01 2004)
+ # Ok so let's make dietlibc ssp aware (Aug 7 2004) -solar
+ # ${FILESDIR}/ssp.c does not appear to be integrated with
+ # upstream as of dietlibc-0.27 bug 73112 - solar (Dec 05 2004)
+ cp ${FILESDIR}/ssp.c ${S}/lib/ || die "Failed to copy ssp.c into lib for compile"
+
# start with sparc/sparc64/x86_64/i386 for now.
# apply to all arches for crazy cross-compiling - robbat2 (Oct 01 2004)
epatch ${FILESDIR}/dietlibc-0.26-ssp.patch
- append-flags -D__dietlibc__
- # end ssp block code
# Fix for 45716
replace-sparc64-flags
# be very careful to only effect the CFLAGS used for optimization
# and not any of the other CFLAGS. - robbat2 (Oct 01 2004)
+
+ # Shifted ssp exclusion logic into sed expression. - solar (Dec 05 2004)
sed -i \
- -e "s:^CFLAGS+=-O -fomit-frame-pointer:CFLAGS += ${CFLAGS}:" \
+ -e "s:^CFLAGS+=-O -fomit-frame-pointer:CFLAGS += ${CFLAGS} -D__dietlibc__:" \
+ -e "s:^CFLAGS=-pipe -nostdinc:CFLAGS=-pipe -nostdinc -D__dietlibc__ -fno-stack-protector-all -fno-stack-protector:" \
-e "s:^prefix.*:prefix=/usr/diet:" \
Makefile \
|| die "sed Makefile failed"
diff --git a/dev-libs/dietlibc/files/ssp.c b/dev-libs/dietlibc/files/ssp.c
index 1a8910c0af7a..18d16fec4609 100644
--- a/dev-libs/dietlibc/files/ssp.c
+++ b/dev-libs/dietlibc/files/ssp.c
@@ -1,6 +1,6 @@
/*
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-x86/dev-libs/dietlibc/files/ssp.c,v 1.1 2004/08/07 23:30:19 solar Exp $
+ * $Header: /var/cvsroot/gentoo-x86/dev-libs/dietlibc/files/ssp.c,v 1.2 2004/12/05 19:25:40 solar Exp $
*
* This is a modified version of Hiroaki Etoh's stack smashing routines
* implemented for glibc.
@@ -28,13 +28,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
-#include <sys/syslog.h>
#include <sys/time.h>
-#include <sys/sysctl.h>
-
-#ifndef _PATH_LOG
-#define _PATH_LOG "/dev/log"
-#endif
#ifdef __PROPOLICE_BLOCK_SEGV__
#define SSP_SIGTYPE SIGSEGV
@@ -50,25 +44,10 @@ void
__guard_setup (void)
{
size_t size;
-#ifdef HAVE_DEV_ERANDOM
- int mib[3];
-#endif
-
if (__guard != 0UL)
return;
#ifndef __SSP_QUICK_CANARY__
-#ifdef HAVE_DEV_ERANDOM
- /* Random is another depth in Linux, hence an array of 3. */
- mib[0] = CTL_KERN;
- mib[1] = KERN_RANDOM;
- mib[2] = RANDOM_ERANDOM;
-
- size = sizeof (unsigned long);
- if (__sysctl (mib, 3, &__guard, &size, NULL, 0) != (-1))
- if (__guard != 0UL)
- return;
-#endif
/*
* Attempt to open kernel pseudo random device if one exists before
* opening urandom to avoid system entropy depletion.
@@ -109,13 +88,7 @@ __stack_smash_handler (char func[], int damaged)
const char message[] = ": stack smashing attack in function ";
int bufsz, len;
char buf[512];
-#ifndef __dietlibc__
- struct sockaddr_un sock; /* AF_UNIX address of local logger */
- int log;
- extern char *__progname;
-#else
static char *__progname = "dietapp";
-#endif
sigset_t mask;
sigfillset (&mask);
@@ -144,18 +117,8 @@ __stack_smash_handler (char func[], int damaged)
/* print error message */
write (STDERR_FILENO, buf + 3, len - 3);
write (STDERR_FILENO, "()\n", 3);
-#ifndef __dietlibc__
- if ((log = socket (AF_UNIX, SOCK_DGRAM, 0)) != -1)
- {
- /* Send "found" message to the "/dev/log" path */
- sock.sun_family = AF_UNIX;
- (void) strncpy (sock.sun_path, _PATH_LOG, sizeof (sock.sun_path) - 1);
- sock.sun_path[sizeof (sock.sun_path) - 1] = '\0';
- sendto (log, buf, len, 0, (struct sockaddr *) &sock, sizeof (sock));
- }
-#endif
- /* Make sure the default handler is associated with the our signal handler */
+ /* Make sure the default handler is associated with the our signal handler */
memset (&sa, 0, sizeof (struct sigaction));
sigfillset (&sa.sa_mask); /* Block all signals */
sa.sa_flags = 0;