> > >>> I'm trying to compile vsftpd 2.03 with tcpwrappers and SSL support
> > >>> on OpenBSD 3.7. I've edited the builddefs.h per the readme.ssl file
Here is an update for vsftpd port:
- enabling SSL support by default
- new flavor to build vsftpd with TCP Wrappers support
Some advises by robert@
Please, we continue the thread on [EMAIL PROTECTED]
--
Alexandre Anriot
[EMAIL PROTECTED]
diff -urN /usr/ports/net/vsftpd/Makefile net/vsftpd/Makefile
--- /usr/ports/net/vsftpd/Makefile Fri Jun 10 09:00:31 2005
+++ net/vsftpd/Makefile Fri Jun 10 17:50:49 2005
@@ -24,8 +24,16 @@
MAKE_FLAGS= CC="${CC}" CFLAGS="${CFLAGS} -Wall -W -Wshadow"
SAMPLEDIR= ${PREFIX}/share/examples/vsftpd
-NO_REGRESS= Yes
+FLAVORS= tcpwrappers
+FLAVOR?=
+
+.if ${FLAVOR:L:Mtcpwrappers}
+pre-build:
+ @perl -pi -e "s,#undef VSF_BUILD_TCPWRAPPERS,#define
VSF_BUILD_TCPWRAPPERS," \
+ ${WRKSRC}/builddefs.h
+.endif
+
do-configure:
@perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," ${WRKSRC}/defs.h
@@ -36,5 +44,7 @@
${INSTALL_DATA_DIR} ${SAMPLEDIR}
@cp -r ${WRKSRC}/EXAMPLE/* ${SAMPLEDIR}
${INSTALL_DATA} ${WRKSRC}/vsftpd.conf ${SAMPLEDIR}
+
+NO_REGRESS= Yes
.include <bsd.port.mk>
diff -urN /usr/ports/net/vsftpd/patches/patch-builddefs_h
net/vsftpd/patches/patch-builddefs_h
--- /usr/ports/net/vsftpd/patches/patch-builddefs_h Thu Jan 1 01:00:00 1970
+++ net/vsftpd/patches/patch-builddefs_h Fri Jun 10 17:50:59 2005
@@ -0,0 +1,14 @@
+$OpenBSD$
+--- builddefs.h.orig Sat Mar 19 18:50:20 2005
++++ builddefs.h Fri Jun 10 17:50:56 2005
+@@ -2,8 +2,8 @@
+ #define VSF_BUILDDEFS_H
+
+ #undef VSF_BUILD_TCPWRAPPERS
+-#define VSF_BUILD_PAM
+-#undef VSF_BUILD_SSL
++#undef VSF_BUILD_PAM
++#define VSF_BUILD_SSL
+
+ #endif /* VSF_BUILDDEFS_H */
+
diff -urN /usr/ports/net/vsftpd/patches/patch-tcpwrap_c
net/vsftpd/patches/patch-tcpwrap_c
--- /usr/ports/net/vsftpd/patches/patch-tcpwrap_c Thu Jan 1 01:00:00 1970
+++ net/vsftpd/patches/patch-tcpwrap_c Fri Jun 10 10:08:53 2005
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- tcpwrap.c.orig Fri Jun 10 10:08:18 2005
++++ tcpwrap.c Fri Jun 10 10:08:32 2005
+@@ -10,6 +10,7 @@
+ #include "tcpwrap.h"
+ #include "builddefs.h"
+ #include "utility.h"
++#include <sys/types.h>
+
+ #ifdef VSF_BUILD_TCPWRAPPERS
+ #include <tcpd.h>
diff -urN /usr/ports/net/vsftpd/pkg/DESCR net/vsftpd/pkg/DESCR
--- /usr/ports/net/vsftpd/pkg/DESCR Mon Dec 15 22:55:13 2003
+++ net/vsftpd/pkg/DESCR Fri Jun 10 17:49:11 2005
@@ -5,3 +5,8 @@
Recent evidence shows that vsftpd is also extremely fast and scalable.
vsftpd has achieved ~4000 concurrent users on a single machine, in a
production environment.
+
+Flavor:
+
+ * ssl - build the SSL support
+ * tcpwrappers - build the TCP wrappers support
diff -urN /usr/ports/net/vsftpd/pkg/MESSAGE net/vsftpd/pkg/MESSAGE
--- /usr/ports/net/vsftpd/pkg/MESSAGE Thu Apr 7 20:59:46 2005
+++ net/vsftpd/pkg/MESSAGE Fri Jun 10 10:11:45 2005
@@ -1,14 +1,16 @@
-You can run vsftpd in standalone mode:
+You can run vsftpd in standalone mode from the shell or through inetd:
-$ sudo vsftpd &
+* in vsftpd.conf: listen=NO
-Or through inetd:
-
-- in vstftp.conf: listen=NO
-
-- in inetd.conf:
- # normal mode
+* in inetd.conf with normal mode:
"ftp stream tcp nowait root ${PREFIX}/sbin/vsftpd vsftpd"
- # or with tcp-wrappers (see tcpd(8))
+ or with tcp-wrappers (see tcpd(8))
"ftp stream tcp nowait root /usr/libexec/tcpd ${PREFIX}/sbin/vsftpd"
+
+
+If you have built the port with SSL support, you have to add:
+
+* in vsftpd.conf: ssl_enable=YES
+
+* a ssl key in /usr/share/ssl/certs/vsftpd.pem