sbonazzo / rpms / cyrus-sasl

Forked from rpms/cyrus-sasl 2 years ago
Clone

Blame SOURCES/cyrus-sasl-2.1.26-relro.patch

794a5c
diff -up cyrus-sasl-2.1.26/lib/Makefile.am.relro cyrus-sasl-2.1.26/lib/Makefile.am
794a5c
--- cyrus-sasl-2.1.26/lib/Makefile.am.relro	2012-10-12 16:05:48.000000000 +0200
794a5c
+++ cyrus-sasl-2.1.26/lib/Makefile.am	2013-02-11 14:18:01.749053772 +0100
794a5c
@@ -64,7 +64,7 @@ LIB_DOOR= @LIB_DOOR@
794a5c
 lib_LTLIBRARIES = libsasl2.la
794a5c
 
794a5c
 libsasl2_la_SOURCES = $(common_sources) $(common_headers)
794a5c
-libsasl2_la_LDFLAGS = -version-info $(sasl_version)
794a5c
+libsasl2_la_LDFLAGS = -Wl,-z,relro -version-info $(sasl_version)
794a5c
 libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
794a5c
 libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
794a5c
 
794a5c
diff -up cyrus-sasl-2.1.26/plugins/Makefile.am.relro cyrus-sasl-2.1.26/plugins/Makefile.am
794a5c
--- cyrus-sasl-2.1.26/plugins/Makefile.am.relro	2012-10-12 16:05:48.000000000 +0200
794a5c
+++ cyrus-sasl-2.1.26/plugins/Makefile.am	2013-02-11 14:18:01.749053772 +0100
794a5c
@@ -50,7 +50,7 @@
794a5c
 plugin_version = 3:0:0
794a5c
 
794a5c
 INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
794a5c
-AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)
794a5c
+AM_LDFLAGS = -Wl,-z,relro -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)
794a5c
 
794a5c
 COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@
794a5c
 
794a5c
diff -up cyrus-sasl-2.1.26/saslauthd/Makefile.am.relro cyrus-sasl-2.1.26/saslauthd/Makefile.am
794a5c
--- cyrus-sasl-2.1.26/saslauthd/Makefile.am.relro	2013-02-11 14:18:36.910900647 +0100
794a5c
+++ cyrus-sasl-2.1.26/saslauthd/Makefile.am	2013-02-11 14:20:17.336463915 +0100
794a5c
@@ -17,6 +17,7 @@ saslauthd_DEPENDENCIES = saslauthd-main.
794a5c
 saslauthd_LDADD	= @SASL_KRB_LIB@ \
794a5c
 		  @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
794a5c
 		  @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@
794a5c
+saslauthd_LDFLAGS = -pie -Wl,-z,now
794a5c
 
794a5c
 testsaslauthd_SOURCES = testsaslauthd.c utils.c
794a5c
 testsaslauthd_LDADD = @LIB_SOCKET@