diff options
author | mm <mm@FreeBSD.org> | 2012-01-14 04:18:39 +0800 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2012-01-14 04:18:39 +0800 |
commit | 044aba4fbff12a484920093b38b71b93ce8e7df0 (patch) | |
tree | 2a99ed4734cdabc9da9caaeded932ef4b21772e7 /ftp/proftpd | |
parent | 9f226308fbfd3cedca175a65a405b5815f2a93a3 (diff) | |
download | freebsd-ports-gnome-044aba4fbff12a484920093b38b71b93ce8e7df0.tar.gz freebsd-ports-gnome-044aba4fbff12a484920093b38b71b93ce8e7df0.tar.zst freebsd-ports-gnome-044aba4fbff12a484920093b38b71b93ce8e7df0.zip |
Allow build on patched FreeBSD 7.x (FreeBSD-SA-11:07.chroot)
WITH_SHAPER requires WITH_CTRLS [1]
PR: ports/163941 [1]
Reported by: Matthew Pounsett <matt@conundrum.com> [1]
Diffstat (limited to 'ftp/proftpd')
-rw-r--r-- | ftp/proftpd/Makefile | 21 | ||||
-rw-r--r-- | ftp/proftpd/files/extra-patch-7-src-fsio.c | 19 | ||||
-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 |