Add partial relro support for libraries

This commit is contained in:
Jan F. Chadima 2011-08-10 04:21:03 +02:00
parent d7f276a4dd
commit 0e14c2a9a8
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,25 @@
diff -up cyrus-sasl-2.1.23/lib/Makefile.am.relro cyrus-sasl-2.1.23/lib/Makefile.am
--- cyrus-sasl-2.1.23/lib/Makefile.am.relro 2009-04-28 17:09:15.000000000 +0200
+++ cyrus-sasl-2.1.23/lib/Makefile.am 2011-08-10 03:53:47.994891976 +0200
@@ -60,7 +60,7 @@ LIB_DOOR= @LIB_DOOR@
lib_LTLIBRARIES = libsasl2.la
libsasl2_la_SOURCES = $(common_sources) $(common_headers)
-libsasl2_la_LDFLAGS = -version-info $(sasl_version)
+libsasl2_la_LDFLAGS = -Wl,-z,relro -version-info $(sasl_version)
libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
diff -up cyrus-sasl-2.1.23/plugins/Makefile.am.relro cyrus-sasl-2.1.23/plugins/Makefile.am
--- cyrus-sasl-2.1.23/plugins/Makefile.am.relro 2011-08-10 04:01:39.725891950 +0200
+++ cyrus-sasl-2.1.23/plugins/Makefile.am 2011-08-10 04:02:47.674892053 +0200
@@ -62,7 +62,7 @@ ldapdb_version = 2:23:0
srp_version = 2:23:0
INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
-AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir)
+AM_LDFLAGS = -Wl,-z,relro -module -export-dynamic -rpath $(plugindir)
COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@
diff -up cyrus-sasl-2.1.23/sasldb/Makefile.am.relro cyrus-sasl-2.1.23/sasldb/Makefile.am

View File

@ -8,7 +8,7 @@
Summary: The Cyrus SASL library
Name: cyrus-sasl
Version: 2.1.23
Release: 25%{?dist}
Release: 26%{?dist}
License: BSD with advertising
Group: System Environment/Libraries
# Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/;
@ -44,6 +44,7 @@ Patch38: cyrus-sasl-2.1.23-pam_rhosts.patch
Patch39: cyrus-sasl-2.1.23-ntlm.patch
Patch40: cyrus-sasl-2.1.23-rimap2.patch
Patch41: cyrus-sasl-2.1.23-db5.patch
Patch42: cyrus-sasl-2.1.23-relro.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, automake, libtool, gdbm-devel, groff
@ -180,6 +181,7 @@ chmod -x include/*.h
%patch39 -p1 -b .ntlm
%patch40 -p1 -b .rimap2
%patch41 -p1 -b .db5
%patch42 -p1 -b .relro
%build
# FIXME - we remove these files directly so that we can avoid using the -f
@ -432,6 +434,9 @@ exit 0
/etc/rc.d/init.d/saslauthd
%changelog
* Wed Aug 10 2011 Jan F. Chadima <jchadima@redhat.com> - 2.1.23-26
- Add partial relro support for libraries
* Mon Jul 25 2011 Jan F. Chadima <jchadima@redhat.com> - 2.1.23-25
- Add support for berkeley db 5