[coreutils] compile su with pie again (#630017)

Ondrej Vasik ovasik at fedoraproject.org
Mon Sep 6 07:31:40 UTC 2010


commit f050d2d59c0d109ea80a273036c32ec0df68ae14
Author: Ondřej Vašík <ovasik at redhat.com>
Date:   Mon Sep 6 09:31:40 2010 +0200

    compile su with pie again (#630017)

 coreutils-8.4-su-pie.patch |   11 +++++++++++
 coreutils.spec             |   11 ++++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/coreutils-8.4-su-pie.patch b/coreutils-8.4-su-pie.patch
new file mode 100644
index 0000000..75db725
--- /dev/null
+++ b/coreutils-8.4-su-pie.patch
@@ -0,0 +1,11 @@
+diff -urNp coreutils-8.4-orig/src/Makefile.am coreutils-8.4/src/Makefile.am
+--- coreutils-8.4-orig/src/Makefile.am	2010-09-03 17:34:43.399747649 +0200
++++ coreutils-8.4/src/Makefile.am	2010-09-03 17:36:13.005765125 +0200
+@@ -367,6 +367,7 @@ factor_LDADD += $(LIB_GMP)
+ 
+ # for crypt
+ su_LDADD += $(LIB_CRYPT) @LIB_PAM@
++su_LDFLAGS = -pie
+ 
+ # for various ACL functions
+ copy_LDADD += $(LIB_ACL)
diff --git a/coreutils.spec b/coreutils.spec
index 34ed34d..3f0c69a 100644
--- a/coreutils.spec
+++ b/coreutils.spec
@@ -1,7 +1,7 @@
 Summary: A set of basic GNU tools commonly used in shell scripts
 Name:    coreutils
 Version: 8.5
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: GPLv3+
 Group:   System Environment/Base
 Url:     http://www.gnu.org/software/coreutils/
@@ -64,6 +64,8 @@ Patch912: coreutils-overflow.patch
 Patch915: coreutils-split-pam.patch
 #prevent koji build failure with wrong getfacl exit code
 Patch916: coreutils-getfacl-exit-code.patch
+#compile su with pie flag
+Patch917: coreutils-8.4-su-pie.patch
 
 #SELINUX Patch - implements Redhat changes
 #(upstream did some SELinux implementation unlike with RedHat patch)
@@ -149,6 +151,7 @@ Libraries for coreutils package.
 %patch912 -p1 -b .overflow
 %patch915 -p1 -b .splitl
 %patch916 -p1 -b .getfacl-exit-code
+%patch917 -p1 -b .pie
 
 #SELinux
 %patch950 -p1 -b .selinux
@@ -179,8 +182,7 @@ automake --copy --add-missing
 touch man/*.x
 
 make all %{?_smp_mflags} \
-         %{?!nopam:CPPFLAGS="-DUSE_PAM"} \
-         su_LDFLAGS="-pie %{?!nopam:-lpam -lpam_misc}"
+         %{?!nopam:CPPFLAGS="-DUSE_PAM"}
 
 # XXX docs should say /var/run/[uw]tmp not /etc/[uw]tmp
 sed -i -e 's,/etc/utmp,/var/run/utmp,g;s,/etc/wtmp,/var/run/wtmp,g' doc/coreutils.texi
@@ -342,6 +344,9 @@ fi
 %{_libdir}/coreutils
 
 %changelog
+* Mon Sep 06 2010 Ondrej Vasik <ovasik at redhat.com> - 8.5-6
+- compile su with pie again (#630017)
+
 * Mon Aug 30 2010 Ondrej Vasik <ovasik at redhat.com> - 8.5-5
 - fix double free abort in tac (#628213)
 


More information about the scm-commits mailing list