From 7d3c2c49f4a2ae0bb54d34b456166de19f5049d8 Mon Sep 17 00:00:00 2001 From: David Christenson Date: Mon, 12 May 2014 06:52:54 -0600 Subject: [PATCH] vsftpd 3.0.2 Update to latest stable release, modify openssl option, and add a new patch for incompatible linker flags. --- Formula/vsftpd.rb | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Formula/vsftpd.rb b/Formula/vsftpd.rb index e02d739ca49..235d92f472d 100644 --- a/Formula/vsftpd.rb +++ b/Formula/vsftpd.rb @@ -2,16 +2,17 @@ require 'formula' class Vsftpd < Formula homepage 'https://security.appspot.com/vsftpd.html' - url 'https://security.appspot.com/downloads/vsftpd-2.3.4.tar.gz' - sha1 'b774cc6b4c50e20f4fe9ca7f6aa74169ce7fe5ea' + url 'https://security.appspot.com/downloads/vsftpd-3.0.2.tar.gz' + sha1 'f36976bb1c5df25ac236d8a29e965ba2b825ccd0' - option "openssl", "Build with OpenSSL" + depends_on 'openssl' => :optional - # Patch so vsftpd doesn't depend on UTMPX, and can't find OS X's PAM library. + # Patch to remove UTMPX dependency, locate OS X's PAM library, and + # remove incompatible LDFLAGS. (reported to developer via email) patch :DATA def install - if build.include? "openssl" + if build.with? "openssl" inreplace "builddefs.h", "#undef VSF_BUILD_SSL", "#define VSF_BUILD_SSL" end @@ -66,3 +67,16 @@ index b988be6..68d4a34 100755 else locate_library /lib/libcrypt.so && echo "-lcrypt"; locate_library /usr/lib/libcrypt.so && echo "-lcrypt"; +diff --git a/Makefile b/Makefile +index c63ed1b..556519e 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,7 +10,7 @@ CFLAGS = -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 \ + + LIBS = `./vsf_findlibs.sh` + LINK = -Wl,-s +-LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now ++LDFLAGS = -fPIE -pie + + OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ + tunables.o ftpdataio.o secbuf.o ls.o \