aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MOVED1
-rw-r--r--ftp/Makefile1
-rw-r--r--ftp/vsftpd-ext/Makefile114
-rw-r--r--ftp/vsftpd-ext/distinfo2
-rw-r--r--ftp/vsftpd-ext/files/patch-utility13
-rw-r--r--ftp/vsftpd-ext/files/vsftpd.in51
-rw-r--r--ftp/vsftpd-ext/pkg-deinstall16
-rw-r--r--ftp/vsftpd-ext/pkg-descr3
-rw-r--r--ftp/vsftpd-ext/pkg-install36
-rw-r--r--ftp/vsftpd-ext/pkg-plist49
10 files changed, 285 insertions, 1 deletions
diff --git a/MOVED b/MOVED
index 7afd76532b78..4a9d685a7cca 100644
--- a/MOVED
+++ b/MOVED
@@ -6611,7 +6611,6 @@ emulators/psim-freebsd||2014-09-01|Not staged
emulators/vMac||2014-09-01|Not staged
finance/opentaxsolver||2014-09-01|Not staged
french/facturier||2014-09-01|Not staged
-ftp/vsftpd-ext||2014-09-01|Not staged
games/actx||2014-09-01|Not staged
games/atitd||2014-09-01|Not staged
games/avp-demo||2014-09-01|Not staged
diff --git a/ftp/Makefile b/ftp/Makefile
index a75bc7d5eb68..e958dbfaf48c 100644
--- a/ftp/Makefile
+++ b/ftp/Makefile
@@ -96,6 +96,7 @@
SUBDIR += uftp
SUBDIR += urlgfe
SUBDIR += vsftpd
+ SUBDIR += vsftpd-ext
SUBDIR += waiho
SUBDIR += weex
SUBDIR += wget
diff --git a/ftp/vsftpd-ext/Makefile b/ftp/vsftpd-ext/Makefile
new file mode 100644
index 000000000000..7e7b77ca50e8
--- /dev/null
+++ b/ftp/vsftpd-ext/Makefile
@@ -0,0 +1,114 @@
+# Created by: Maxim Ignatenko
+# $FreeBSD$
+
+PORTNAME= vsftpd-ext
+PORTVERSION= ${UPSTREAMVERSION}.${EXTVERSION}
+CATEGORIES= ftp ipv6
+MASTER_SITES= http://vsftpd.devnet.ru/files/${UPSTREAMVERSION}/ext.${EXTVERSION}/
+PKGNAMESUFFIX?= ${SSL_SUFFIX}${PKGNAMESUFFIX2}
+DISTNAME= vsFTPd-${UPSTREAMVERSION}-ext${EXTVERSION}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= xjflyttp@gmail.com
+COMMENT= FTP daemon that aims to be "very secure". Extended build
+
+LICENSE= GPLv2
+
+UPSTREAMVERSION=3.0.2
+EXTVERSION= 1
+
+USES+= gmake
+WRKSRC= ${WRKDIR}/vsFTPd-${UPSTREAMVERSION}-ext.${EXTVERSION}
+ALL_TARGET= vsftpd
+
+USERS= ftp
+GROUPS= ftp
+
+DOCFILES= AUDIT BENCHMARKS BUGS Changelog FAQ INSTALL LICENSE \
+ README README.security README.ssl REFS REWARD \
+ SIZE SPEED TODO TUNING
+
+OPTIONS_DEFINE= RC_SCRIPT VSFTPD_SSL DOCS
+OPTIONS_DEFAULT=RC_SCRIPT DOCS
+RC_SCRIPT_DESC= install RC_SCRIPT
+
+VSFTPD_SSL_DESC=Include support for SSL
+
+CONFLICTS= vsftpd-3* vsftpd${SSL_SUFFIX}${PKGNAMESUFFIX2}-3*
+
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 900000
+BUILD_DEPENDS+= clang33:${PORTSDIR}/lang/clang33
+CC= clang33
+.endif
+
+.if ${PORT_OPTIONS:MRC_SCRIPT}
+USE_RC_SUBR= vsftpd
+.endif
+
+VSFTPD_OPTIMIZED= ${CFLAGS:M-O*}
+.if defined(CFLAGS) && !empty(VSFTPD_OPTIMIZED)
+VSFTPD_NO_OPTIMIZED= -e "s|-O2 ||"
+.endif
+
+.if ${PORT_OPTIONS:MVSFTPD_SSL} && !defined(WITHOUT_SSL)
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+SSL_SUFFIX= -ssl
+CFLAGS+= -I${OPENSSLINC}
+LDFLAGS+= -L${OPENSSLLIB}
+.endif
+
+do-configure:
+.if ${PORT_OPTIONS:MVSFTPD_SSL} && !defined(WITHOUT_SSL)
+ ${REINPLACE_CMD} -e \
+ "s|#undef VSF_BUILD_TCPWRAPPERS|#define VSF_BUILD_TCPWRAPPERS 1|" \
+ -e "s|#undef VSF_BUILD_SSL|#define VSF_BUILD_SSL 1|" \
+ ${WRKSRC}/builddefs.h
+.else
+ ${REINPLACE_CMD} -e \
+ "s|#undef VSF_BUILD_TCPWRAPPERS|#define VSF_BUILD_TCPWRAPPERS 1|" \
+ ${WRKSRC}/builddefs.h
+.endif
+ ${REINPLACE_CMD} -e "s|\"vsftpd.conf\"|\"${PREFIX}/etc/vsftpd.conf\"|" \
+ ${WRKSRC}/defs.h
+ ${REINPLACE_CMD} -e "s|/etc/v|${PREFIX}/etc/v|" \
+ ${WRKSRC}/vsftpd.8 ${WRKSRC}/vsftpd.conf.5
+ ${REINPLACE_CMD} -e "s|/usr/share/empty|${PREFIX}/share/vsftpd/empty|" \
+ ${WRKSRC}/tunables.c
+ ${REINPLACE_CMD} ${VSFTPD_NO_OPTIMIZED} \
+ -e '/^CC/s/=/?=/' \
+ -e '/^CFLAGS/{s/=/+=/;s/-O[0-9]//;}' \
+ -e '/^LIBS/s|=.*|= `./vsf_findlibs.sh`|' \
+ -e '/^LINK/s/=.*/=/' \
+ -e 's|-Werror||' \
+ ${WRKSRC}/Makefile
+ ${REINPLACE_CMD} -e '/-lutil/d' ${WRKSRC}/vsf_findlibs.sh
+
+ @${ECHO_CMD} "secure_chroot_dir=${PREFIX}/share/vsftpd/empty" >> \
+ ${WRKSRC}/vsftpd.conf
+ @${ECHO_CMD} >>${WRKSRC}/vsftpd.conf ""
+ @${ECHO_CMD} >>${WRKSRC}/vsftpd.conf \
+ "# If using vsftpd in standalone mode, uncomment the next two lines:"
+ @${ECHO_CMD} >>${WRKSRC}/vsftpd.conf "# listen=YES"
+ @${ECHO_CMD} >>${WRKSRC}/vsftpd.conf "# background=YES"
+ ${REINPLACE_CMD} -e "s|^listen=.*|listen=NO|" \
+ ${WRKSRC}/vsftpd.conf
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/vsftpd ${STAGEDIR}${PREFIX}/libexec/
+ ${INSTALL_DATA} ${WRKSRC}/vsftpd.conf ${STAGEDIR}${PREFIX}/etc/vsftpd.conf.sample
+ ${INSTALL_MAN} ${WRKSRC}/vsftpd.conf.5 ${STAGEDIR}${PREFIX}/man/man5/
+ ${INSTALL_MAN} ${WRKSRC}/vsftpd.8 ${STAGEDIR}${PREFIX}/man/man8/
+ ${MKDIR} ${STAGEDIR}/var/ftp ${STAGEDIR}${PREFIX}/share/vsftpd/empty
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${DOCFILES:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/
+.for i in EXAMPLE SECURITY
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}/${i}
+ ${CP} -p -R -L ${WRKSRC}/${i}/./ ${STAGEDIR}${DOCSDIR}/${i}/
+ ${CHMOD} -R -L a+rX,go-w ${STAGEDIR}${DOCSDIR}/${i}/
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/ftp/vsftpd-ext/distinfo b/ftp/vsftpd-ext/distinfo
new file mode 100644
index 000000000000..f9119bc305f5
--- /dev/null
+++ b/ftp/vsftpd-ext/distinfo
@@ -0,0 +1,2 @@
+SHA256 (vsFTPd-3.0.2-ext1.tgz) = c276f25e5525dc1b104bde8c437a5a9c0cb0efed16056519214d1b9d71497c7d
+SIZE (vsFTPd-3.0.2-ext1.tgz) = 227801
diff --git a/ftp/vsftpd-ext/files/patch-utility b/ftp/vsftpd-ext/files/patch-utility
new file mode 100644
index 000000000000..95b107022844
--- /dev/null
+++ b/ftp/vsftpd-ext/files/patch-utility
@@ -0,0 +1,13 @@
+--- utility.c.orig Fri Jul 2 18:26:30 2004
++++ utility.c Mon Oct 10 01:19:02 2005
+@@ -33,6 +33,10 @@
+ void
+ bug(const char* p_text)
+ {
++ static int inside_bug = 0;
++ if (inside_bug)
++ vsf_sysutil_exit(1);
++ inside_bug++;
+ /* Rats. Try and write the reason to the network for diagnostics */
+ vsf_sysutil_activate_noblock(VSFTP_COMMAND_FD);
+ (void) vsf_sysutil_write_loop(VSFTP_COMMAND_FD, "500 OOPS: ", 10);
diff --git a/ftp/vsftpd-ext/files/vsftpd.in b/ftp/vsftpd-ext/files/vsftpd.in
new file mode 100644
index 000000000000..1832f6fe9d16
--- /dev/null
+++ b/ftp/vsftpd-ext/files/vsftpd.in
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: vsftpd
+# REQUIRE: DAEMON
+
+# To enable 'vsftpd' in standalone mode, you need to edit two files.
+# 1. add the following line(s) to /etc/rc.conf to enable `vsftpd':
+#
+# vsftpd_enable="YES"
+# vsftpd_flags="/some/path/conf.file" # Not required
+#
+# 2. tell vsftpd about standalone mode
+# Edit %%PREFIX%%/etc/vsftpd.conf (or /some/path/conf.file) to contain
+#
+# listen=YES
+# background=YES
+#
+# Samples are provided at the end of the configuration file.
+
+. /etc/rc.subr
+
+name="vsftpd"
+rcvar=vsftpd_enable
+
+load_rc_config "$name"
+: ${vsftpd_enable:="NO"}
+
+command="%%PREFIX%%/libexec/$name"
+required_files="%%PREFIX%%/etc/$name.conf"
+start_precmd="vsftpd_check"
+
+vsftpd_check()
+{
+ if grep -q "^ftp[ ]" /etc/inetd.conf ${required_files}
+ then
+ err 1 "ftp is already activated in /etc/inetd.conf"
+ fi
+ if ! egrep -q -i -E "^listen.*=.*YES$" ${required_files}
+ then
+ err 1 'vsftpd script need "listen=YES" in config file'
+ fi
+ if ! egrep -q -i -E "^background.*=.*YES$" ${required_files}
+ then
+ err 1 'vsftpd script need "background=YES" in config file'
+ fi
+}
+
+run_rc_command "$1"
diff --git a/ftp/vsftpd-ext/pkg-deinstall b/ftp/vsftpd-ext/pkg-deinstall
new file mode 100644
index 000000000000..654d3223c297
--- /dev/null
+++ b/ftp/vsftpd-ext/pkg-deinstall
@@ -0,0 +1,16 @@
+#!/bin/sh
+# $FreeBSD: /tmp/pcvs/ports/ftp/vsftpd-ext/pkg-deinstall,v 1.1 2009-06-16 03:53:39 pgollucci Exp $
+#
+
+if [ "$2" != "POST-DEINSTALL" ]; then
+ exit 0
+fi
+
+USER=ftp
+
+if pw usershow "${USER}" 2>/dev/null 1>&2; then
+ echo "To delete FTP user permanently, use 'pw userdel ${USER}'"
+ echo "Don't do this if you're using FreeBSD's anonymous FTP server"
+fi
+
+exit 0
diff --git a/ftp/vsftpd-ext/pkg-descr b/ftp/vsftpd-ext/pkg-descr
new file mode 100644
index 000000000000..8871f4927dc7
--- /dev/null
+++ b/ftp/vsftpd-ext/pkg-descr
@@ -0,0 +1,3 @@
+Extended build of vsftpd with additional features.
+
+WWW: http://vsftpd.devnet.ru/eng/
diff --git a/ftp/vsftpd-ext/pkg-install b/ftp/vsftpd-ext/pkg-install
new file mode 100644
index 000000000000..649591984281
--- /dev/null
+++ b/ftp/vsftpd-ext/pkg-install
@@ -0,0 +1,36 @@
+#!/bin/sh
+# $FreeBSD: /tmp/pcvs/ports/ftp/vsftpd-ext/pkg-install,v 1.1 2009-06-16 03:53:39 pgollucci Exp $
+#
+
+if [ "$2" != "PRE-INSTALL" ]; then
+ exit 0
+fi
+
+if ! pw groupshow operator >/dev/null; then
+ if pw groupadd operator 5; then
+ echo "Added group operator for vsftpd"
+ else
+ echo "Failed to add group operator as gid 5" >&2
+ exit 1
+ fi
+fi
+
+if ! pw usershow ftp >/dev/null; then
+ if pw useradd ftp -g operator -u 14 -h - -d /var/ftp -s /nonexistent -c "Anonymous Ftp"; then
+ echo "Added user ftp for vsftpd"
+ else
+ echo "Failed to add user ftp as gid 14" >&2
+ exit 1
+ fi
+fi
+
+# uid=14(ftp) gid=5(operator) groups=5(operator)
+view="$(id ftp)"
+view="${view%% *}"
+if test "${view}" = "uid=14(ftp)"; then
+ exit 0
+fi
+
+echo "User ftp should have uid 14"; >&2
+exit 1
+# eof
diff --git a/ftp/vsftpd-ext/pkg-plist b/ftp/vsftpd-ext/pkg-plist
new file mode 100644
index 000000000000..584f680691b5
--- /dev/null
+++ b/ftp/vsftpd-ext/pkg-plist
@@ -0,0 +1,49 @@
+libexec/vsftpd
+man/man5/vsftpd.conf.5.gz
+man/man8/vsftpd.8.gz
+@sample etc/vsftpd.conf.sample
+@dirrmtry /var/ftp
+@exec if [ ! -d /var/ftp ]; then mkdir /var/ftp ; fi
+@dir share/vsftpd/empty
+%%PORTDOCS%%%%DOCSDIR%%/AUDIT
+%%PORTDOCS%%%%DOCSDIR%%/BENCHMARKS
+%%PORTDOCS%%%%DOCSDIR%%/BUGS
+%%PORTDOCS%%%%DOCSDIR%%/Changelog
+%%PORTDOCS%%%%DOCSDIR%%/FAQ
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README.security
+%%PORTDOCS%%%%DOCSDIR%%/README.ssl
+%%PORTDOCS%%%%DOCSDIR%%/REFS
+%%PORTDOCS%%%%DOCSDIR%%/REWARD
+%%PORTDOCS%%%%DOCSDIR%%/SIZE
+%%PORTDOCS%%%%DOCSDIR%%/SPEED
+%%PORTDOCS%%%%DOCSDIR%%/TODO
+%%PORTDOCS%%%%DOCSDIR%%/TUNING
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/HTTP_TEMPLATES/403-serv.html
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/HTTP_TEMPLATES/403.html
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/HTTP_TEMPLATES/404.html
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/HTTP_TEMPLATES/browse.html
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/HTTP_TEMPLATES/browse_line.html
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/INTERNET_SITE/README
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/INTERNET_SITE/vsftpd.conf
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/INTERNET_SITE/vsftpd.xinetd
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/INTERNET_SITE_NOINETD/README
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/INTERNET_SITE_NOINETD/vsftpd.conf
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/PER_IP_CONFIG/README
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/PER_IP_CONFIG/hosts.allow
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/README
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/VIRTUAL_HOSTS/README
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/VIRTUAL_USERS/README
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/VIRTUAL_USERS/logins.txt
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/VIRTUAL_USERS/vsftpd.conf
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/VIRTUAL_USERS/vsftpd.pam
+%%PORTDOCS%%%%DOCSDIR%%/EXAMPLE/VIRTUAL_USERS_2/README
+%%PORTDOCS%%%%DOCSDIR%%/SECURITY/DESIGN
+%%PORTDOCS%%%%DOCSDIR%%/SECURITY/IMPLEMENTATION
+%%PORTDOCS%%%%DOCSDIR%%/SECURITY/OVERVIEW
+%%PORTDOCS%%%%DOCSDIR%%/SECURITY/TRUST
+%%PORTDOCS%%@dir %%DOCSDIR%%/SECURITY
+%%PORTDOCS%%@dir %%DOCSDIR%%/EXAMPLE
+%%PORTDOCS%%@dir %%DOCSDIR%%