Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 51386 | Differences between
and this patch

Collapse All | Expand All

(-)glibc-2.3.3_pre20040420-r1.ebuild (+12 lines)
Lines 280-289 src_unpack() { Link Here
280
	#  http://www.gentoo.org/proj/en/hardened/etdyn-ssp.xml
280
	#  http://www.gentoo.org/proj/en/hardened/etdyn-ssp.xml
281
	if [ "${ARCH}" != "hppa" -a "${ARCH}" != "hppa64" ]
281
	if [ "${ARCH}" != "hppa" -a "${ARCH}" != "hppa64" ]
282
	then
282
	then
283
		local flags
283
		cd ${S}
284
		cd ${S}
284
		epatch ${FILESDIR}/2.3.3/${LOCAL_P}-propolice-guard-functions-v3.patch
285
		epatch ${FILESDIR}/2.3.3/${LOCAL_P}-propolice-guard-functions-v3.patch
285
		cp ${FILESDIR}/2.3.3/ssp.c ${S}/sysdeps/unix/sysv/linux || \
286
		cp ${FILESDIR}/2.3.3/ssp.c ${S}/sysdeps/unix/sysv/linux || \
286
			die "failed to copy ssp.c to ${S}/sysdeps/unix/sysv/linux/"
287
			die "failed to copy ssp.c to ${S}/sysdeps/unix/sysv/linux/"
288
289
		has_ssp && flags="-fno-stack-protector -fno-stack-protector-all"
290
		flags="${flags} -D__LIBSSP__ -Wl,-soname,libssp.so.${MY_PV}"
291
		$(gcc-getCC) ${flags} -shared -fPIC -o ${S}/libssp.so.${MY_PV}
292
287
		# gcc 3.4 nukes ssp without this patch
293
		# gcc 3.4 nukes ssp without this patch
288
		if [ "`gcc-major-version`" -ge "3" -a "`gcc-minor-version`" -ge "4" ]
294
		if [ "`gcc-major-version`" -ge "3" -a "`gcc-minor-version`" -ge "4" ]
289
		then
295
		then
Lines 648-653 EOF Link Here
648
654
649
	# Some things want this, notably ash.
655
	# Some things want this, notably ash.
650
	dosym /usr/lib/libbsd-compat.a /usr/lib/libbsd.a
656
	dosym /usr/lib/libbsd-compat.a /usr/lib/libbsd.a
657
658
	if [ -e "${S}/libssp.so.${MY_PV}" ]
659
	then
660
		cp ${S}/libssp.so.${MY_PV} ${D}/usr/lib/
661
		dosym /usr/lib/libssp.so.${MY_PV} /usr/lib/libssp.so
662
	fi
651
}
663
}
652
664
653
pkg_postinst() {
665
pkg_postinst() {
(-)files/2.3.3/ssp.c (-1 / +9 lines)
Lines 46-51 Link Here
46
46
47
unsigned long __guard = 0UL;
47
unsigned long __guard = 0UL;
48
48
49
#ifdef __LIBSSP__
50
static void __guard_setup (void) __attribute__ ((constructor));
51
static
52
#endif
49
void
53
void
50
__guard_setup (void)
54
__guard_setup (void)
51
{
55
{
Lines 103-109 __guard_setup (void) Link Here
103
}
107
}
104
108
105
void
109
void
106
__stack_smash_handler (char func[], int damaged)
110
__stack_smash_handler (char func[], int damaged
111
#ifdef __LIBSSP__
112
ATTRIBUTE_UNUSED
113
#endif
114
)
107
{
115
{
108
  struct sockaddr_un sock;	/* AF_UNIX address of local logger */
116
  struct sockaddr_un sock;	/* AF_UNIX address of local logger */
109
  struct sigaction sa;
117
  struct sigaction sa;

Return to bug 51386