- Issue a warning if FORTIFY_CHECKING is requested, but disabled.

This commit is contained in:
Jeff Law 2012-04-13 11:24:58 -06:00
parent f818b5c715
commit 64e6774cce
2 changed files with 28 additions and 1 deletions

20
glibc-sw13979.patch Normal file
View File

@ -0,0 +1,20 @@
2012-03-30 Jeff Law <law@redhat.com>
* include/features.h: Warn if user requests FORTIFY_SOURCE checking
but the checks are disabled for any reason.
diff --git a/include/features.h b/include/features.h
index c347555..e3ad8b0 100644
--- a/include/features.h
+++ b/include/features.h
@@ -325,6 +325,10 @@
# define __USE_FORTIFY_LEVEL 0
#endif
+#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 && __USE_FORTIFY_LEVEL == 0
+# warning _FORTIFY_SOURCE requested but disabled
+#endif
+
/* We do support the IEC 559 math functionality, real and complex. */
#define __STDC_IEC_559__ 1
#define __STDC_IEC_559_COMPLEX__ 1

View File

@ -28,7 +28,7 @@
Summary: The GNU libc libraries Summary: The GNU libc libraries
Name: glibc Name: glibc
Version: %{glibcversion} Version: %{glibcversion}
Release: 33%{?dist} Release: 34%{?dist}
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries. # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
# Things that are linked directly into dynamically linked programs # Things that are linked directly into dynamically linked programs
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
@ -184,6 +184,9 @@ Patch2050: %{name}-rh682500.patch
# Upstream BZ 13761 # Upstream BZ 13761
Patch2051: %{name}-rh788989-2.patch Patch2051: %{name}-rh788989-2.patch
# Upstream BZ 13979
Patch2052: %{name}-sw13979.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: glibc-profile < 2.4 Obsoletes: glibc-profile < 2.4
@ -450,6 +453,7 @@ rm -rf %{glibcportsdir}
%patch2049 -p1 %patch2049 -p1
%patch2050 -p1 %patch2050 -p1
%patch2051 -p1 %patch2051 -p1
%patch2052 -p1
# A lot of programs still misuse memcpy when they have to use # A lot of programs still misuse memcpy when they have to use
# memmove. The memcpy implementation below is not tolerant at # memmove. The memcpy implementation below is not tolerant at
@ -1302,6 +1306,9 @@ rm -f *.filelist*
%endif %endif
%changelog %changelog
* Fri Apr 13 2012 Jeff Law <law@redhat.com> - 2.15-34
- Issue a warning if FORTIFY_CHECKING is requested, but disabled.
* Thu Apr 12 2012 Jeff Law <law@redhat.com> - 2.15-33 * Thu Apr 12 2012 Jeff Law <law@redhat.com> - 2.15-33
- Fix another unbound alloca in nscd groups (#788989) - Fix another unbound alloca in nscd groups (#788989)