From 79296a82aaa0a7cde28113b34fa9e1be315df7ca Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Mon, 15 Apr 2013 13:01:33 +0200 Subject: [PATCH] make dovecot executables hardened --- dovecot.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dovecot.spec b/dovecot.spec index 166ad6a..e792ccd 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -136,8 +136,9 @@ sed -i '/DEFAULT_INCLUDES *=/s|$| '"$(pkg-config --cflags libclucene-core)|" src %build #required for fdpass.c line 125,190: dereferencing type-punned pointer will break strict-aliasing rules -export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -export LDFLAGS="-Wl,-z,now -Wl,-z,relro" +%global _hardened_build 1 +export CFLAGS="%{__global_cflags} -fno-strict-aliasing" +export LDFLAGS="-Wl,-z,now -Wl,-z,relro %{__global_ldflags}" autoreconf -I . -fiv #required for aarch64 support %configure \ INSTALL_DATA="install -c -p -m644" \