[rbldnsd] Fix initscript, harden build

Paul Howarth pghmcfc at fedoraproject.org
Mon Apr 16 15:47:56 UTC 2012


commit ddfb862ab09a2b23894f4bcbf1d52878dcd365c8
Author: Paul Howarth <paul at city-fan.org>
Date:   Mon Apr 16 16:47:01 2012 +0100

    Fix initscript, harden build
    
    - Fix some initscript issues (#807504)
    - Do a hardened build (PIE) where possible

 rbldnsd.init |    5 +++--
 rbldnsd.spec |   13 +++++++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/rbldnsd.init b/rbldnsd.init
index f587f45..cb333a8 100644
--- a/rbldnsd.init
+++ b/rbldnsd.init
@@ -9,12 +9,13 @@
 # processname: /usr/sbin/rbldnsd
 # config: /etc/sysconfig/network
 # config: /etc/sysconfig/rbldnsd
-# pidfile: /var/run/rbldnsd*.pid
+# pidfiles: /var/run/rbldnsd*.pid
 
 ### BEGIN INIT INFO
 # Provides: rbldnsd
 # Required-Start: $local_fs $network $syslog
 # Required-Stop: $local_fs $network $syslog
+# Default-Stop: 0 1 2 3 4 5 6
 # Short-Description: Start or stop DNS daemon for DNSBLs
 # Description: rbldnsd is a DNS daemon for DNSBLs
 ### END INIT INFO
@@ -74,8 +75,8 @@ for_all_daemons() {
 					ret=1
 				fi
 			fi
-			set_status $ret
 		done
+	set_status $ret
 }
 
 start_one_daemon() {
diff --git a/rbldnsd.spec b/rbldnsd.spec
index 75958d3..d8d476f 100644
--- a/rbldnsd.spec
+++ b/rbldnsd.spec
@@ -1,7 +1,10 @@
+# Build hardened (PIE) where possible
+%define _hardened_build 1
+
 Summary:	Small, fast daemon to serve DNSBLs
 Name:		rbldnsd
 Version:	0.996b
-Release:	5%{?dist}
+Release:	6%{?dist}
 License:	GPLv2+
 Group:		System Environment/Daemons
 URL:		http://www.corpit.ru/mjt/rbldnsd.html
@@ -26,7 +29,9 @@ sed -i	-e 's@/var/lib/rbldns\([/ ]\)@%{_localstatedir}/lib/rbldnsd\1 at g' \
 
 %build
 # this is not an autotools-generated configure script, and does not support --libdir
-CFLAGS="%{optflags}" ./configure
+CFLAGS="%{optflags}" \
+LDFLAGS="%{?__global_ldflags}" \
+./configure
 make
 
 %install
@@ -70,6 +75,10 @@ fi
 %{_initrddir}/rbldnsd
 
 %changelog
+* Mon Apr 16 2012 Paul Howarth <paul at city-fan.org> 0.996b-6
+- fix some initscript issues (#807504)
+- do a hardened build (PIE) where possible
+
 * Thu Jan  5 2012 Paul Howarth <paul at city-fan.org> 0.996b-5
 - nobody else likes macros for commands
 


More information about the scm-commits mailing list