Package: l2tpns
Version: 2.1.21-1.1
Severity: important
Tags: patch

Please enable hardened build flags through dpkg-buildflags.

Patch attached. (dpkg-buildflags abides "noopt" from DEB_BUILD_OPTIONS)

Cheers,
        Moritz
diff -aur l2tpns-2.1.21.harden/debian/rules l2tpns-2.1.21/debian/rules
--- l2tpns-2.1.21.harden/debian/rules	2012-01-29 12:11:56.000000000 +0100
+++ l2tpns-2.1.21/debian/rules	2012-01-29 12:12:40.000000000 +0100
@@ -2,9 +2,6 @@
 # Sample debian/rules that uses debhelper.
 # GNU copyright 1997 to 1999 by Joey Hess.
 
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -g
-endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	INSTALL_PROGRAM += -s
 endif
Nur in l2tpns-2.1.21/debian: rules~.
diff -aur l2tpns-2.1.21.harden/Makefile l2tpns-2.1.21/Makefile
--- l2tpns-2.1.21.harden/Makefile	2005-12-07 06:21:37.000000000 +0100
+++ l2tpns-2.1.21/Makefile	2012-01-29 12:14:37.000000000 +0100
@@ -10,16 +10,14 @@
 DEFINES += -DLIBDIR='"$(libdir)"'
 DEFINES += -DETCDIR='"$(etcdir)"'
 
-OPTIM =
-OPTIM += -g
-OPTIM += -O3
+DEB_CFLAGS_MAINT_APPEND=-Wall -O3 -Wno-format-zero-length
 
 CC = gcc
 LD = gcc
 INCLUDES = -I.
-CPPFLAGS = $(INCLUDES) $(DEFINES)
-CFLAGS = -Wall -Wformat-security -Wno-format-zero-length $(OPTIM)
-LDFLAGS =
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` $(INCLUDES) $(DEFINES)
+CFLAGS = `dpkg-buildflags --get CFLAGS`
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
 LDLIBS =
 INSTALL = install -c -D -o root -g root
 
Nur in l2tpns-2.1.21: Makefile~.

Reply via email to