From e34aa6b7a4e83794ed347135fee150780c014895 Mon Sep 17 00:00:00 2001 From: Tomas Hozza Date: Fri, 19 Apr 2013 15:45:07 +0200 Subject: [PATCH] Compile the daemon with PIE Signed-off-by: Tomas Hozza --- dnsmasq.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dnsmasq.spec b/dnsmasq.spec index ab8753e..f81c23e 100644 --- a/dnsmasq.spec +++ b/dnsmasq.spec @@ -79,6 +79,10 @@ sed -i 's|#conf-dir=/etc/dnsmasq.d|conf-dir=/etc/dnsmasq.d|g' dnsmasq.conf.examp %build +# We need to compile the daemon with PIE +RPM_LD_FLAGS="-Wl,-z,relro -pie" +RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIE -DPIE -fPIC" + make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" make -C contrib/wrt %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" @@ -143,6 +147,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Fri Apr 19 2013 Tomas Hozza - 2.66-3 +- compile the daemon with PIE - include two fixes from upstream git repo * Thu Apr 18 2013 Tomas Hozza - 2.66-2