Package: multipath-tools
Version: 0.4.9-3
Severity: important
Tags: patch
Please enable hardened build flags through dpkg-buildflags.
Patch attached.
Cheers,
Moritz
diff -aur multipath-tools-0.4.9.harden/kpartx/Makefile multipath-tools-0.4.9/kpartx/Makefile
--- multipath-tools-0.4.9.harden/kpartx/Makefile 2010-05-22 14:01:58.000000000 +0200
+++ multipath-tools-0.4.9/kpartx/Makefile 2012-01-29 12:37:47.000000000 +0100
@@ -6,7 +6,7 @@
CFLAGS += -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-LDFLAGS = -ldevmapper
+LDFLAGS = `dpkg-buildflags --get LDFLAGS` -ldevmapper
OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \
gpt.o mac.o crc32.o lopart.o xstrncpy.o devmapper.o
EXEC = kpartx
Nur in multipath-tools-0.4.9/kpartx: Makefile~.
diff -aur multipath-tools-0.4.9.harden/Makefile.inc multipath-tools-0.4.9/Makefile.inc
--- multipath-tools-0.4.9.harden/Makefile.inc 2010-05-22 14:01:58.000000000 +0200
+++ multipath-tools-0.4.9/Makefile.inc 2012-01-29 12:37:22.000000000 +0100
@@ -35,10 +35,12 @@
GZIP = /bin/gzip -9 -c
INSTALL_PROGRAM = install
-OPTFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes
-CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\"
+OPTFLAGS = -pipe -Wall -Wunused -Wstrict-prototypes
+CFLAGS = `dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get CPPFLAGS` $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\"
SHARED_FLAGS = -shared
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
+
+
Nur in multipath-tools-0.4.9: Makefile.inc~.
diff -aur multipath-tools-0.4.9.harden/multipath/Makefile multipath-tools-0.4.9/multipath/Makefile
--- multipath-tools-0.4.9.harden/multipath/Makefile 2010-05-22 14:01:58.000000000 +0200
+++ multipath-tools-0.4.9/multipath/Makefile 2012-01-29 12:37:56.000000000 +0100
@@ -7,7 +7,7 @@
OBJS = main.o
CFLAGS += -I$(multipathdir)
-LDFLAGS += -lpthread -ldevmapper -ldl -lmultipath -L$(multipathdir)
+LDFLAGS += `dpkg-buildflags --get LDFLAGS` -lpthread -ldevmapper -ldl -lmultipath -L$(multipathdir)
EXEC = multipath
Nur in multipath-tools-0.4.9/multipath: Makefile~.
diff -aur multipath-tools-0.4.9.harden/multipathd/Makefile multipath-tools-0.4.9/multipathd/Makefile
--- multipath-tools-0.4.9.harden/multipathd/Makefile 2012-01-29 12:35:20.000000000 +0100
+++ multipath-tools-0.4.9/multipathd/Makefile 2012-01-29 12:38:03.000000000 +0100
@@ -6,7 +6,7 @@
# basic flags setting
#
CFLAGS += -I$(multipathdir)
-LDFLAGS += -lpthread -ldevmapper -lreadline -ldl \
+LDFLAGS += `dpkg-buildflags --get LDFLAGS` -lpthread -ldevmapper -lreadline -ldl \
-lmultipath -L$(multipathdir)
#
Nur in multipath-tools-0.4.9/multipathd: Makefile~.