Package: ppp
Version: 2.4.5-5
Severity: important
Tags: patch

Please enable hardened build flags through dpkg-buildflags.

Patch attached.

Cheers,
        Moritz
diff -Naur ppp-2.4.5.harden/debian/patches/dpkg-buildflags ppp-2.4.5/debian/patches/dpkg-buildflags
--- ppp-2.4.5.harden/debian/patches/dpkg-buildflags	1970-01-01 01:00:00.000000000 +0100
+++ ppp-2.4.5/debian/patches/dpkg-buildflags	2012-01-31 22:29:27.000000000 +0100
@@ -0,0 +1,57 @@
+diff -aur ppp-2.4.5.orig/pppd/Makefile.linux ppp-2.4.5/pppd/Makefile.linux
+--- ppp-2.4.5.orig/pppd/Makefile.linux	2012-01-31 22:27:59.000000000 +0100
++++ ppp-2.4.5/pppd/Makefile.linux	2012-01-31 22:28:23.000000000 +0100
+@@ -32,8 +32,8 @@
+ 
+ # CC = gcc
+ #
+-CFLAGS = -O2 -g
+-LIBS = -lutil
++CFLAGS = `dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get CPPFLAGS`
++LIBS = -lutil `dpkg-buildflags --get LDFLAGS`
+ 
+ # Uncomment the next 2 lines to include support for Microsoft's
+ # MS-CHAP authentication protocol.  Also, edit plugins/radius/Makefile.linux.
+diff -aur ppp-2.4.5.orig/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux
+--- ppp-2.4.5.orig/pppd/plugins/rp-pppoe/Makefile.linux	2012-01-31 22:27:59.000000000 +0100
++++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux	2012-01-31 22:28:20.000000000 +0100
+@@ -25,7 +25,7 @@
+ # Version is set ONLY IN THE MAKEFILE!  Don't delete this!
+ RP_VERSION=3.8p
+ 
+-CFLAGS=-O2 -g
++CFLAGS=`dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get CPPFLAGS`
+ COPTS=-I../../../include '-DRP_VERSION="$(RP_VERSION)"'
+ all: rp-pppoe.so pppoe-discovery
+ 
+diff -aur ppp-2.4.5.orig/pppdump/Makefile.linux ppp-2.4.5/pppdump/Makefile.linux
+--- ppp-2.4.5.orig/pppdump/Makefile.linux	2012-01-31 22:27:59.000000000 +0100
++++ ppp-2.4.5/pppdump/Makefile.linux	2012-01-31 22:28:20.000000000 +0100
+@@ -6,10 +6,10 @@
+ DO_BSD_COMPRESS=y
+ HAVE_ZLIB=y
+ 
+-CFLAGS=-O2 -g
++CFLAGS=`dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get CPPFLAGS`
+ COPTS= -I../include/net
+ OBJS = pppdump.o
+-LIBS =
++LIBS =`dpkg-buildflags --get LDFLAGS`
+ 
+ ifdef DO_DEFLATE
+ COPTS += -DDO_DEFLATE=1
+diff -aur ppp-2.4.5.orig/pppstats/Makefile.linux ppp-2.4.5/pppstats/Makefile.linux
+--- ppp-2.4.5.orig/pppstats/Makefile.linux	2012-01-31 22:27:59.000000000 +0100
++++ ppp-2.4.5/pppstats/Makefile.linux	2012-01-31 22:28:20.000000000 +0100
+@@ -10,9 +10,9 @@
+ PPPSTATOBJS = pppstats.o
+ 
+ #CC = gcc
+-CFLAGS = -O2 -g
++CFLAGS = `dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get CPPFLAGS`
+ COPTS = -I../include
+-LIBS =
++LIBS =`dpkg-buildflags --get LDFLAGS`
+ 
+ INSTALL= install
+ 
diff -Naur ppp-2.4.5.harden/debian/patches/series ppp-2.4.5/debian/patches/series
--- ppp-2.4.5.harden/debian/patches/series	2012-01-31 22:28:56.000000000 +0100
+++ ppp-2.4.5/debian/patches/series	2012-01-31 22:30:13.000000000 +0100
@@ -39,4 +39,4 @@
 no_crypt_hack
 resolv.conf_no_log
 zzz_config
-
+dpkg-buildflags

Reply via email to