reopen 677261
thanks

Hello,

The problem aren't the hardening flags, but the flags set in
Makefile. 3.0.0-2 still fails to build on amd64 and other systems
(in fact it worked before on amd64 because +all and thus +pie was
used). This issue should be reported to upstream.

The attached patches should fix the build failure by removing the
hardcoded flags in Makefile and applying all flags which are
supported on the system (+all automatically disables +pie on
freebsd and other systems).

Btw. some patches apply with offsets and should be refreshed.

Regards,
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
Description: Don't set the hardening flags manually.
 Instead take them from dpkg-buildflags which automatically disables
 unsupported flags on the current architecture.
.
 Prevents build failure on e.g. kfreebsd.
Author: Simon Ruderich <si...@ruderich.org>
Last-Update: 2012-06-24

--- vsftpd-3.0.0.orig/Makefile
+++ vsftpd-3.0.0/Makefile
@@ -3,14 +3,13 @@ CC 	=	gcc
 INSTALL	=	install
 IFLAGS  = -idirafter dummyinc
 #CFLAGS = -g
-CFLAGS	=	-O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \
+CFLAGS	+=	-O2 \
 	-Wall -W -Wshadow -Werror -Wformat-security \
 	-D_FORTIFY_SOURCE=2 \
 	#-pedantic -Wconversion
 
 LIBS	=	`./vsf_findlibs.sh`
 LINK	=	-Wl,-s
-LDFLAGS	=	-fPIE -pie -Wl,-z,relro -Wl,-z,now
 
 OBJS	=	main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \
 		tunables.o ftpdataio.o secbuf.o ls.o \
diff -Nru vsftpd-3.0.0/debian/rules vsftpd-3.0.0/debian/rules
--- vsftpd-3.0.0/debian/rules	2012-06-12 18:32:34.000000000 +0200
+++ vsftpd-3.0.0/debian/rules	2012-06-24 15:56:27.000000000 +0200
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 
-export DEB_BUILD_MAINT_OPTIONS = hardening=-all
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 

Attachment: signature.asc
Description: Digital signature

Reply via email to