aboutsummaryrefslogtreecommitdiff
path: root/ftp/proftpd
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2012-01-13 20:18:39 +0000
committerMartin Matuska <mm@FreeBSD.org>2012-01-13 20:18:39 +0000
commit9f6afb244994e3a3b818b95aa587fb7eea61c228 (patch)
tree82b40130d01297705635ac009ebdb90ddfce1c93 /ftp/proftpd
parent007061a5f410337074a02d05644db31a799c468b (diff)
downloadports-9f6afb244994e3a3b818b95aa587fb7eea61c228.tar.gz
ports-9f6afb244994e3a3b818b95aa587fb7eea61c228.zip
Notes
Diffstat (limited to 'ftp/proftpd')
-rw-r--r--ftp/proftpd/Makefile21
-rw-r--r--ftp/proftpd/files/extra-patch-7-src-fsio.c19
-rw-r--r--ftp/proftpd/files/extra-patch-8-src-fsio.c (renamed from ftp/proftpd/files/patch-src-fsio.c)0
3 files changed, 37 insertions, 3 deletions
diff --git a/ftp/proftpd/Makefile b/ftp/proftpd/Makefile
index 78d533cc9782..390bfeedb254 100644
--- a/ftp/proftpd/Makefile
+++ b/ftp/proftpd/Makefile
@@ -52,7 +52,7 @@ CONFIGURE_ARGS= --localstatedir=${LOCALSTATEDIR} \
--enable-dso \
--disable-sendfile
-OPTIONS= BAN "Include mod_ban (Requires CTRLS)" off \
+OPTIONS= BAN "Include mod_ban (requires CTRLS)" off \
CLAMAV "Include mod_clamav" off \
CTRLS "Include controls" off \
DYNMASQ "Include mod_dynmasq" off \
@@ -61,7 +61,7 @@ OPTIONS= BAN "Include mod_ban (Requires CTRLS)" off \
IFSESSION "Include mod_ifsession" on \
IPV6 "Use IPv6" on \
LDAP "Use LDAP" off \
- LDAP_TLS "Use LDAP TLS (Requires LDAP, OPENSSL)" off
+ LDAP_TLS "Use LDAP TLS (requires LDAP, OPENSSL)" off
# Set the MYSQL option based upon the setting from the
# slave port (ftp/proftpd-mysql).
@@ -77,7 +77,7 @@ OPTIONS+= NLS "Use nls (builds mod_lang)" on \
PGSQL "Postgres auth" off \
QUOTA "Include mod_quota" off \
QUOTATAB_RADIUS "include mod_quotatab_radius" off \
- SHAPER "Shaper module" off \
+ SHAPER "Shaper module (requires CTRLS)" off \
SQLITE "SQLite auth" off \
RADIUS "Include mod_radius" on \
RATIO "Include mod_ratio" on \
@@ -103,6 +103,18 @@ PLIST_SUB+= LOCALSTATEDIR="${LOCALSTATEDIR}"
.include <bsd.port.pre.mk>
+# FreeBSD-SA-11:07.chroot
+.if ${OSVERSION} < 800000
+CHROOT_TEST != ${GREP} __FreeBSD_libc_enter_restricted_mode \
+ /usr/include/unistd.h > /dev/null || ${ECHO_CMD} error
+. if ${CHROOT_TEST} == "error"
+BROKEN=__FreeBSD_libc_enter_restricted_mode is not supported
+. endif
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-7-src-fsio.c
+.else
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-8-src-fsio.c
+.endif
+
.if ${ARCH} == "sparc64" && ${OSVERSION} > 900000
BROKEN= Does not compile on sparc64-9: storage size of 'utx' isn't known
.endif
@@ -157,6 +169,9 @@ MODULES:=${MODULES}:mod_radius
.endif
.if defined(WITH_SHAPER)
+.if !defined(WITH_CTRLS)
+IGNORE= option BAN requires CTRLS
+.endif
MODULES:=${MODULES}:mod_shaper
.endif
diff --git a/ftp/proftpd/files/extra-patch-7-src-fsio.c b/ftp/proftpd/files/extra-patch-7-src-fsio.c
new file mode 100644
index 000000000000..22e66f6f7ab2
--- /dev/null
+++ b/ftp/proftpd/files/extra-patch-7-src-fsio.c
@@ -0,0 +1,19 @@
+--- src/fsio.c.orig 2010-04-12 12:00:00.000000000 -0700
++++ src/fsio.c 2011-12-16 15:12:07.799166185 -0800
+@@ -50,6 +50,8 @@
+ # include <acl/libacl.h>
+ #endif
+
++#include <unistd.h>
++
+ typedef struct fsopendir fsopendir_t;
+
+ struct fsopendir {
+@@ -287,6 +289,7 @@
+ static int sys_chroot(pr_fs_t *fs, const char *path) {
+ if (chroot(path) < 0)
+ return -1;
++ __FreeBSD_libc_enter_restricted_mode();
+
+ session.chroot_path = (char *) path;
+ return 0;
diff --git a/ftp/proftpd/files/patch-src-fsio.c b/ftp/proftpd/files/extra-patch-8-src-fsio.c
index 3b085be7283c..3b085be7283c 100644
--- a/ftp/proftpd/files/patch-src-fsio.c
+++ b/ftp/proftpd/files/extra-patch-8-src-fsio.c