From d7edada88f8b048ed0470bb1a8cae9d767e6e572 Mon Sep 17 00:00:00 2001 From: Steve Date: Aug 30 2012 18:46:59 +0000 Subject: Make daemon full RELRO --- diff --git a/trousers-no-werror.patch b/trousers-no-werror.patch index f8697ab..639b580 100644 --- a/trousers-no-werror.patch +++ b/trousers-no-werror.patch @@ -1,6 +1,6 @@ diff -ur trousers-0.3.9.orig/configure trousers-0.3.9/configure --- trousers-0.3.9.orig/configure 2012-05-30 11:16:40.000000000 -0400 -+++ trousers-0.3.9/configure 2012-08-27 12:39:14.432278839 -0400 ++++ trousers-0.3.9/configure 2012-08-30 14:14:18.569347485 -0400 @@ -13503,7 +13503,7 @@ @@ -10,3 +10,15 @@ diff -ur trousers-0.3.9.orig/configure trousers-0.3.9/configure fi CFLAGS="$CFLAGS -I../include \ +diff -ur trousers-0.3.9.orig/src/tcsd/Makefile.in trousers-0.3.9/src/tcsd/Makefile.in +--- trousers-0.3.9.orig/src/tcsd/Makefile.in 2012-05-30 11:16:41.000000000 -0400 ++++ trousers-0.3.9/src/tcsd/Makefile.in 2012-08-30 14:14:18.570347484 -0400 +@@ -56,7 +56,7 @@ + ${top_builddir}/src/tddl/libtddl.a + tcsd_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(tcsd_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ +- $(LDFLAGS) -o $@ ++ -Wl,-z,relro -Wl,-z,now $(LDFLAGS) -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles diff --git a/trousers.spec b/trousers.spec index fa5fa9c..23d6f83 100644 --- a/trousers.spec +++ b/trousers.spec @@ -1,7 +1,7 @@ Name: trousers Summary: TCG's Software Stack v1.2 Version: 0.3.9 -Release: 3%{?dist} +Release: 4%{?dist} License: CPL Group: System Environment/Libraries Url: http://trousers.sourceforge.net @@ -74,24 +74,13 @@ useradd -r -u 59 -g tss -d /dev/null -s /sbin/nologin \ exit 0 %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post tcsd.service %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable tcsd.service > /dev/null 2>&1 || : - /bin/systemctl stop tcsd.service > /dev/null 2>&1 || : -fi +%systemd_preun tcsd.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart tcsd.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart tcsd.service %files %defattr(-, root, root, -) @@ -120,6 +109,9 @@ fi %{_libdir}/libtddl.a %changelog +* Thu Aug 30 2012 Steve Grubb 0.3.9-4 +- Make daemon full RELRO + * Mon Aug 27 2012 Steve Grubb 0.3.9-3 - bz #836476 - Provide native systemd service