diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-06-07 01:38:58 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-06-07 01:38:58 +0000 |
commit | da4220002df47cec6ee811529aaeba9e3cf60133 (patch) | |
tree | c40c83fabe2898b656589b58aa0f4cf937a6f56a /sys-libs/glibc | |
parent | Cleanup the CHOST-GCCVER parsing so it isnt so fragile (and works with BSD ho... (diff) | |
download | historical-da4220002df47cec6ee811529aaeba9e3cf60133.tar.gz historical-da4220002df47cec6ee811529aaeba9e3cf60133.tar.bz2 historical-da4220002df47cec6ee811529aaeba9e3cf60133.zip |
Make sure we dont build ssp.c with stack-protector and disable syslog() until we have a better fix #94325.
Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'sys-libs/glibc')
-rw-r--r-- | sys-libs/glibc/ChangeLog | 8 | ||||
-rw-r--r-- | sys-libs/glibc/Manifest | 31 | ||||
-rw-r--r-- | sys-libs/glibc/files/2.3.5/glibc-2.3.5-propolice-guard-functions.patch | 40 | ||||
-rw-r--r-- | sys-libs/glibc/files/2.3.5/ssp.c | 27 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.3.5.ebuild | 4 |
5 files changed, 84 insertions, 26 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog index 433385a5cc5c..031593d0a9d8 100644 --- a/sys-libs/glibc/ChangeLog +++ b/sys-libs/glibc/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-libs/glibc # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.347 2005/06/05 08:55:42 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.348 2005/06/07 01:38:58 vapier Exp $ + + 07 Jun 2005; Mike Frysinger <vapier@gentoo.org> files/2.3.5/ssp.c, + +files/2.3.5/glibc-2.3.5-propolice-guard-functions.patch, + glibc-2.3.5.ebuild: + Make sure we dont build ssp.c with stack-protector and disable syslog() + until we have a better fix #94325. 05 Jun 2005; Mike Frysinger <vapier@gentoo.org> +files/2.3.4/glibc234-alpha-xstat.patch, glibc-2.3.4.20041102.ebuild, diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index 059fe3b31dde..9be7779b8ce3 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -1,17 +1,16 @@ -MD5 1e53426a13eda8c97d9ae73600481bbd ChangeLog 73647 +MD5 8f37a085bc59b22d9e1b54b1e41ff463 ChangeLog 73910 MD5 45b53d55a7990f579c81cc9698091b8b glibc-2.2.5-r10.ebuild 4454 -MD5 567094e03359ffc1c95af7356395228d metadata.xml 162 MD5 41a105e32ad4b0a4a8a2129645eed295 glibc-2.3.2-r12.ebuild 22301 -MD5 96a676313793fa0650a22368edc4f687 glibc-2.3.5.ebuild 39698 MD5 aeaeffc56ce8fedabbb5682693320b6b glibc-2.3.3.20040420-r2.ebuild 21685 MD5 e44a41af599672120302813550b65a61 glibc-2.3.4.20040619-r2.ebuild 21356 -MD5 ba667046defd34daaeb2a986ff83549b glibc-2.3.5.20050421.ebuild 40445 -MD5 c8706ef0b979c4e34874fedf97f79d50 glibc-2.3.4.20041102-r1.ebuild 34013 MD5 7946da1bf84f19ad3896a61428c7a05a glibc-2.3.4.20040808-r1.ebuild 27705 -MD5 f657c3015509b40205f9eefa49d12c89 glibc-2.3.4.20050125-r1.ebuild 38637 +MD5 c8706ef0b979c4e34874fedf97f79d50 glibc-2.3.4.20041102-r1.ebuild 34013 MD5 d86de5e7a8193469732cc7489bd9494f glibc-2.3.4.20041102.ebuild 33049 +MD5 f657c3015509b40205f9eefa49d12c89 glibc-2.3.4.20050125-r1.ebuild 38637 MD5 3622860499eecaced6dda4562aeb1b65 glibc-2.3.4.20050125.ebuild 35394 -MD5 8d58079469aedb014a800101ef60558f files/nsswitch.conf 503 +MD5 ba667046defd34daaeb2a986ff83549b glibc-2.3.5.20050421.ebuild 40445 +MD5 d75a19506d6c6f656a4691d7d85791a4 glibc-2.3.5.ebuild 39695 +MD5 567094e03359ffc1c95af7356395228d metadata.xml 162 MD5 bed7cbcac1e8582deda43664e5b3f19c files/digest-glibc-2.2.5-r10 290 MD5 2d5306ef875573750af642a9f93b634a files/digest-glibc-2.3.2-r12 312 MD5 42af7e35fe2404a49954f91fd1aee891 files/digest-glibc-2.3.3.20040420-r2 312 @@ -25,17 +24,18 @@ MD5 6a7b14ffb6320bc8c7fc73e86f6bb973 files/digest-glibc-2.3.5 518 MD5 7a909f8df7cc20f37fb7553c8dcb47b4 files/digest-glibc-2.3.5.20050421 604 MD5 e4393f4721a207750581d6265d5f7f40 files/fix-sysctl_h.patch 376 MD5 52cfc7627fc62dfb26d8d163aac361f6 files/glibc-2.2.2-test-lfs-timeout.patch 320 -MD5 c4300e2f8808cb38a308745ed8b77367 files/locales.build 602 -MD5 bedcd868a9462009158714238594173c files/nscd 964 -MD5 2013443f5192d4b999953ba4248d288c files/nscd.conf 1158 -MD5 d8830438ea871dbfd1acf7a3d0299159 files/test-__thread.c 53 -MD5 4404ee4b6e3017819d8f36082e0265e5 files/test-sysctl_h.c 54 MD5 135f8145885a2f4f9876fe973f33ddf6 files/glibc-2.2.4-string2.h.diff 5221 MD5 b712a49b5113fccb4c8b0ada2a30d390 files/glibc-manpages-2.2.5.tar.bz2 14610 MD5 184eddb92615fb991dce41b9edbfa690 files/glibc-manpages-2.3.2.tar.bz2 14700 MD5 13701e6cc0de584680502c0cd958f2cf files/glibc-sec-hotfix-20040804.patch 4319 MD5 bbe355d94c5a36e11f543d12b70b5702 files/glibc-sec-hotfix-20040916.patch 3080 MD5 d688e44731d6e4b757382d7646c492c3 files/glibc-xdr_security.patch 6612 +MD5 c4300e2f8808cb38a308745ed8b77367 files/locales.build 602 +MD5 bedcd868a9462009158714238594173c files/nscd 964 +MD5 2013443f5192d4b999953ba4248d288c files/nscd.conf 1158 +MD5 8d58079469aedb014a800101ef60558f files/nsswitch.conf 503 +MD5 d8830438ea871dbfd1acf7a3d0299159 files/test-__thread.c 53 +MD5 4404ee4b6e3017819d8f36082e0265e5 files/test-sysctl_h.c 54 MD5 f75ebd335c4b882013cc12229d39c9f7 files/2.2.5/glibc-2.2.5-alpha-gcc3-fix.diff 475 MD5 843eaa26ae2c49e894aa365b6f463546 files/2.2.5/glibc-2.2.5-alpha-pcdyn-fix.diff 471 MD5 5182f441608833569cb9e78536baf8af files/2.2.5/glibc-2.2.5-arm-errlist-fix.diff 2210 @@ -55,8 +55,9 @@ MD5 e6dc1e4d7839d2bb08c6865466791183 files/2.2.5/glibc-2.2.5-sunrpc-overflow.dif MD5 993732f56fdecf36f672198112fc5d5c files/2.2.5/glibc-2.2.5-threadsig.diff 636 MD5 a50da56218f9aabc347d7e1130961cec files/2.2.5/glibc-2.2.5.divbyzero.patch 1694 MD5 e9d9d086e8ed29ed49252d4cd0050f66 files/2.2.5/glibc-2.2.5.restrict_arr.patch 762 -MD5 4575b331281d900d837b301795bd1641 files/2.3.5/ssp.c 3865 +MD5 b3ce53b86060b6209a182366c501a0f1 files/2.3.5/ssp.c 4297 MD5 04bcec718f2883f28bf862b7e390d1b0 files/2.3.5/glibc-2.3.5-frandom-detect.patch 3080 +MD5 13dd059e6383c7cac94d1bda126af21d files/2.3.5/glibc-2.3.5-propolice-guard-functions.patch 1302 MD5 941f13d27badc76c1e3704c59acaff26 files/2.3.1/glibc-2.3.1-ctype-compat-v3.patch 2823 MD5 4f8ecd70003c5ca153ff7c204c54c1cf files/2.3.1/glibc-2.3.1-elf-machine-rela-mips.patch 1246 MD5 afaf2540d2803ac066eb2555f2019a6f files/2.3.1/glibc-2.3.1-exit-syscall-mips.patch 633 @@ -104,17 +105,17 @@ MD5 0e3ced9c3c484f502dcade7ffffa15f4 files/2.3.2/ssp.c 3935 MD5 250d09cb52d2c3c7f6b0c4e0a1bf47f2 files/2.3.2/sysmacros.h 2443 MD5 d7097bf7fe910f2cba6ec69f86eb1958 files/2.3.2/glibc-2.3.2-alpha-sysdeps.patch 939 MD5 fa3bf332c71b0b5af56b536564abc480 files/2.3.2/glibc-2.3.2-assert.patch 1596 -MD5 0e27dbd2a3b85a0e14625294296fad9a files/2.3.3/glibc-2.3.2-propolice-guard-functions-v3.patch 1986 MD5 1b5df7c58ad160593192704cece47347 files/2.3.3/glibc-2.3.3-dl_execstack-PaX-support.patch 1791 MD5 62f7e62583aaa70645d9c847b6a84299 files/2.3.3/glibc-2.3.3-frandom-detect.patch 1770 MD5 ec83f3d86f23243a1fb334b8872d454f files/2.3.3/glibc-2.3.3-localedef-fix-trampoline.patch 2329 MD5 0bfc56be86acec8ec52fe29249e267a4 files/2.3.3/glibc-2.3.3-owl-malloc-unlink-sanity-check.diff 1425 +MD5 ae9425cd4199cccd69c6d22633583dc1 files/2.3.3/ssp.c 4041 MD5 175bde9b0017d4deb63cf55f38173e11 files/2.3.3/glibc-2.3.3_pre20040117-got-fix.diff 752 MD5 a3eb98943bc9db66df33bfc08dea4c2e files/2.3.3/glibc-2.3.3_pre20040117-pt_pax.diff 1470 MD5 7b6054c2e8ec654341690586bc2028c5 files/2.3.3/glibc-2.3.3_pre20040117-signal-ssp.diff 1431 MD5 86626ba8df9cac083bb3e1cfe23ec07e files/2.3.3/glibc-2.3.3_pre20040420-mips-dl-machine-calls.diff 1497 MD5 ab91cb5bad07e1e79f990d4933741d42 files/2.3.3/glibc-2.3.3_pre20040420-mips-incl-sgidefs.diff 8287 -MD5 ae9425cd4199cccd69c6d22633583dc1 files/2.3.3/ssp.c 4041 +MD5 0e27dbd2a3b85a0e14625294296fad9a files/2.3.3/glibc-2.3.2-propolice-guard-functions-v3.patch 1986 MD5 ff0a2716aebc6fb8a2e3b3f2c9be8bba files/2.3.3/glibc-2.3.3-tempfile.patch 1787 MD5 ca1d4648f72e5fea2858fdb6ea3d39a0 files/2.3.3/glibc-2.3.3-mips-addabi.diff 1720 MD5 f9343413b90877edfcaeedf89b3dec77 files/2.3.3/glibc-2.3.3-mips-nolib3264.diff 1166 diff --git a/sys-libs/glibc/files/2.3.5/glibc-2.3.5-propolice-guard-functions.patch b/sys-libs/glibc/files/2.3.5/glibc-2.3.5-propolice-guard-functions.patch new file mode 100644 index 000000000000..9b05ed65fc67 --- /dev/null +++ b/sys-libs/glibc/files/2.3.5/glibc-2.3.5-propolice-guard-functions.patch @@ -0,0 +1,40 @@ +--- glibc-2.3.5/sysdeps/generic/libc-start.c ++++ glibc-2.3.5/sysdeps/generic/libc-start.c +@@ -188,6 +188,9 @@ + GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]); + #endif + ++ /* call the __guard_setup to set up the random __guard value */ ++ __guard_setup (); /* pappy@gentoo.org (pappy rules) */ ++ + #ifdef HAVE_CLEANUP_JMP_BUF + /* Memory for the cancellation buffer. */ + struct pthread_unwind_buf unwind_buf; +--- glibc-2.3.5/sysdeps/unix/sysv/linux/Dist ++++ glibc-2.3.5/sysdeps/unix/sysv/linux/Dist +@@ -1,3 +1,4 @@ ++ssp.c + bits/initspin.h + cmsg_nxthdr.c + dl-brk.c +--- glibc-2.3.5/sysdeps/unix/sysv/linux/Makefile ++++ glibc-2.3.5/sysdeps/unix/sysv/linux/Makefile +@@ -1,5 +1,6 @@ + ifeq ($(subdir),csu) +-sysdep_routines += errno-loc ++sysdep_routines += errno-loc ssp ++CFLAGS-ssp.c += -fno-stack-protector + endif + + ifeq ($(subdir),assert) +--- glibc-2.3.5/sysdeps/unix/sysv/linux/Versions ++++ glibc-2.3.5/sysdeps/unix/sysv/linux/Versions +@@ -108,6 +108,8 @@ + GLIBC_2.3.2 { + # New kernel interfaces. + epoll_create; epoll_ctl; epoll_wait; ++ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org ++ __guard; __guard_setup; __stack_smash_handler; + } + GLIBC_2.3.3 { + gnu_dev_major; gnu_dev_minor; gnu_dev_makedev; diff --git a/sys-libs/glibc/files/2.3.5/ssp.c b/sys-libs/glibc/files/2.3.5/ssp.c index 47453c585624..880158d5cd31 100644 --- a/sys-libs/glibc/files/2.3.5/ssp.c +++ b/sys-libs/glibc/files/2.3.5/ssp.c @@ -1,6 +1,6 @@ /* * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/2.3.5/ssp.c,v 1.2 2005/05/27 22:12:17 vapier Exp $ + * $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/2.3.5/ssp.c,v 1.3 2005/06/07 01:38:58 vapier Exp $ * * This is a modified version of Hiroaki Etoh's stack smashing routines * implemented for glibc. @@ -20,9 +20,9 @@ # include <config.h> #endif -//#ifdef __SSP__ -//# error ssp.c has to be built w/ -fno-stack-protector -//#endif +#ifdef __SSP__ +# error ssp.c has to be built w/ -fno-stack-protector +#endif #include <stdio.h> #include <string.h> @@ -60,13 +60,13 @@ extern int __libc_close(int fd); # define __libc_open(file, flags) __open(file, flags) # define __libc_read(fd, buf, count) __read(fd, buf, count) # define __libc_close(fd) __close(fd) +# define __libc_write(fd, buf, count) __write(fd, buf, count) #endif void __guard_setup(void) __attribute__ ((constructor)); void __guard_setup(void) { size_t size; - struct timeval tv; if (__guard != 0UL) return; @@ -111,9 +111,11 @@ void __guard_setup(void) /* Everything failed? Or we are using a weakened model of the * terminator canary */ - - gettimeofday(&tv, NULL); - __guard ^= tv.tv_usec ^ tv.tv_sec; + { + struct timeval tv; + __gettimeofday(&tv, NULL); + __guard ^= tv.tv_usec ^ tv.tv_sec; + } } void __stack_smash_handler(char func[], int damaged __attribute__ ((unused))); @@ -130,8 +132,17 @@ void __stack_smash_handler(char func[], int damaged) sigprocmask(SIG_BLOCK, &mask, NULL); /* except SSP_SIGTYPE */ /* Print error message to stderr and syslog */ +#if 1 /* syslog() causes issues with glibc #94325 */ + __libc_write(STDERR_FILENO, __progname, strlen(__progname)); + __libc_write(STDERR_FILENO, message, strlen(message)); + __libc_write(STDERR_FILENO, func, strlen(func)); + __libc_write(STDERR_FILENO, "()\n", 3); + //_syscall3(int, _ssp_syslog, int, type, char *, bufp, int, len) + //_ssp_syslog(LOG_INFO, +#else fprintf(stderr, "%s%s%s()\n", __progname, message, func); syslog(LOG_INFO, "%s%s%s()", __progname, message, func); +#endif /* Make the default handler associated with the signal handler */ memset(&sa, 0, sizeof(struct sigaction)); diff --git a/sys-libs/glibc/glibc-2.3.5.ebuild b/sys-libs/glibc/glibc-2.3.5.ebuild index 70309657d699..962d5eed753e 100644 --- a/sys-libs/glibc/glibc-2.3.5.ebuild +++ b/sys-libs/glibc/glibc-2.3.5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5.ebuild,v 1.23 2005/06/06 04:51:41 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5.ebuild,v 1.24 2005/06/07 01:38:58 vapier Exp $ # Here's how the cross-compile logic breaks down ... # CTARGET - machine that will target the binaries @@ -210,7 +210,7 @@ toolchain-glibc_src_unpack() { cd "${S}" cp "${FILESDIR}"/2.3.5/ssp.c sysdeps/unix/sysv/linux/ || die "could not find ssp.c" rm -f "${WORKDIR}"/patches/2* - epatch "${FILESDIR}"/2.3.3/glibc-2.3.2-propolice-guard-functions-v3.patch + epatch "${FILESDIR}"/2.3.5/glibc-2.3.5-propolice-guard-functions.patch epatch "${FILESDIR}"/2.3.5/glibc-2.3.5-frandom-detect.patch if [[ -n ${PATCH_VER} ]] ; then |