[glibc] - Issue a warning if FORTIFY_CHECKING is requested, but disabled.
Jeffrey Law
law at fedoraproject.org
Fri Apr 13 17:25:19 UTC 2012
commit 64e6774cce09e713b9326f483d7e4f34241eee54
Author: Jeff Law <law at redhat.com>
Date: Fri Apr 13 11:24:58 2012 -0600
- Issue a warning if FORTIFY_CHECKING is requested, but disabled.
glibc-sw13979.patch | 20 ++++++++++++++++++++
glibc.spec | 9 ++++++++-
2 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/glibc-sw13979.patch b/glibc-sw13979.patch
new file mode 100644
index 0000000..80d5427
--- /dev/null
+++ b/glibc-sw13979.patch
@@ -0,0 +1,20 @@
+2012-03-30 Jeff Law <law at 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
diff --git a/glibc.spec b/glibc.spec
index b72c645..fe9cf75 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -28,7 +28,7 @@
Summary: The GNU libc libraries
Name: glibc
Version: %{glibcversion}
-Release: 33%{?dist}
+Release: 34%{?dist}
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
# Things that are linked directly into dynamically linked programs
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
@@ -184,6 +184,9 @@ Patch2050: %{name}-rh682500.patch
# Upstream BZ 13761
Patch2051: %{name}-rh788989-2.patch
+# Upstream BZ 13979
+Patch2052: %{name}-sw13979.patch
+
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: glibc-profile < 2.4
@@ -450,6 +453,7 @@ rm -rf %{glibcportsdir}
%patch2049 -p1
%patch2050 -p1
%patch2051 -p1
+%patch2052 -p1
# A lot of programs still misuse memcpy when they have to use
# memmove. The memcpy implementation below is not tolerant at
@@ -1302,6 +1306,9 @@ rm -f *.filelist*
%endif
%changelog
+* Fri Apr 13 2012 Jeff Law <law at redhat.com> - 2.15-34
+ - Issue a warning if FORTIFY_CHECKING is requested, but disabled.
+
* Thu Apr 12 2012 Jeff Law <law at redhat.com> - 2.15-33
- Fix another unbound alloca in nscd groups (#788989)
More information about the scm-commits
mailing list