From owner-freebsd-ports Sat Mar 31 4: 0:16 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2723237B71B for ; Sat, 31 Mar 2001 04:00:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2VC02M97187; Sat, 31 Mar 2001 04:00:02 -0800 (PST) (envelope-from gnats) Received: from totem.fix.no (totem.fix.no [213.142.66.130]) by hub.freebsd.org (Postfix) with ESMTP id 2E2F037B71B for ; Sat, 31 Mar 2001 03:51:30 -0800 (PST) (envelope-from anders@totem.fix.no) Received: by totem.fix.no (Postfix, from userid 1000) id B73933C8E; Sat, 31 Mar 2001 13:51:28 +0200 (CEST) Message-Id: <20010331115128.B73933C8E@totem.fix.no> Date: Sat, 31 Mar 2001 13:51:28 +0200 (CEST) From: Anders Nordby Reply-To: Anders Nordby To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/26243: New port: ftp/oftpd Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 26243 >Category: ports >Synopsis: New port: ftp/oftpd >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Mar 31 04:00:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Anders Nordby >Release: FreeBSD 4.2-STABLE i386 >Organization: Fluxpod Information eXchange >Environment: Tested in: 4.2-STABLE from January FreeBSD current.localnet 5.0-20010116-CURRENT FreeBSD 5.0-20010116-CURRENT #0: Tue Jan 16 16:30:03 GMT 2001 root@usw2.freebsd.org:/usr/src/sys/compile/GENERIC i386 >Description: New port of oftpd, a threaded, anonymous only FTP server designed for security. >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # oftpd # oftpd/pkg-plist # oftpd/pkg-descr # oftpd/pkg-comment # oftpd/distinfo # oftpd/Makefile # oftpd/files # oftpd/files/patch-file_list.c # oftpd/files/patch-ftp_command.c # oftpd/files/patch-af_portability.c # oftpd/files/patch-ftp_listener.c # oftpd/files/patch-ftp_session.c # oftpd/files/patch-configure # echo c - oftpd mkdir -p oftpd > /dev/null 2>&1 echo x - oftpd/pkg-plist sed 's/^X//' >oftpd/pkg-plist << 'END-of-oftpd/pkg-plist' Xlibexec/oftpd Xshare/doc/oftpd/README Xshare/doc/oftpd/AUTHORS Xshare/doc/oftpd/ChangeLog Xshare/doc/oftpd/NEWS Xshare/doc/oftpd/TODO Xshare/doc/oftpd/BUGS X@dirrm share/doc/oftpd END-of-oftpd/pkg-plist echo x - oftpd/pkg-descr sed 's/^X//' >oftpd/pkg-descr << 'END-of-oftpd/pkg-descr' Xoftpd is designed to be as secure as an anonymous FTP server can possibly be. XIt runs as non-root for most of the time, and uses the Unix chroot() command to Xhide most of the systems directories from external users - they cannot change Xinto them even if the server is totally compromised! It contains its own Xdirectory change code, so that it can run efficiently as a threaded server, and Xits own directory listing code (most FTP servers execute the system "ls" Xcommand to list files). X XWWW: http://www.time-travellers.org/oftpd/ END-of-oftpd/pkg-descr echo x - oftpd/pkg-comment sed 's/^X//' >oftpd/pkg-comment << 'END-of-oftpd/pkg-comment' XA threaded, anonymous only FTP server designed for security END-of-oftpd/pkg-comment echo x - oftpd/distinfo sed 's/^X//' >oftpd/distinfo << 'END-of-oftpd/distinfo' XMD5 (oftpd-0.3.3.tar.gz) = 5aedb3495fa262400e71b454a4bd9470 END-of-oftpd/distinfo echo x - oftpd/Makefile sed 's/^X//' >oftpd/Makefile << 'END-of-oftpd/Makefile' X# Ports collection makefile for: oftpd X# Date created: 31 March 2001 X# Whom: Anders Nordby X# X# $FreeBSD$ X# X XPORTNAME= oftpd XPORTVERSION= 0.3.3 XCATEGORIES= ftp XMASTER_SITES= http://www.time-travellers.org/oftpd/ \ X http://www.freenix.no/~anders/ X XMAINTAINER= anders@fix.no X XGNU_CONFIGURE= yes X XDOCFILES= README AUTHORS ChangeLog NEWS TODO BUGS X XCFLAGS+= -D_THREAD_SAFE X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/src/oftpd ${PREFIX}/libexec/oftpd X.if !defined(NOPORTDOCS) X ${INSTALL} -d -m 555 ${PREFIX}/share/doc/oftpd X.for i in ${DOCFILES} X ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/doc/oftpd X.endfor X.endif X Xpost-install: X @${ECHO} "================================================================================" X @${ECHO} "oftpd only runs standalone, not from inetd." X @${ECHO} "Try ${PREFIX}/libexec/oftpd -h to see command line options." X @${ECHO} "Create a README file in the root anonymous FTP dir to have it displayed to" X @${ECHO} "users upon login." X @${ECHO} "================================================================================" X X.include END-of-oftpd/Makefile echo c - oftpd/files mkdir -p oftpd/files > /dev/null 2>&1 echo x - oftpd/files/patch-file_list.c sed 's/^X//' >oftpd/files/patch-file_list.c << 'END-of-oftpd/files/patch-file_list.c' X--- src/file_list.c.old Sat Mar 31 11:27:00 2001 X+++ src/file_list.c Sat Mar 31 11:37:38 2001 X@@ -186,7 +186,11 @@ X /* do a glob() */ X memset(&glob_buf, 0, sizeof(glob_buf)); X glob_ret = glob(pattern, GLOB_ERR, NULL, &glob_buf); X+#ifndef GLOB_NOMATCH /* FreeBSD rocks your world */ X+ if (glob_ret == GLOB_NOCHECK) { X+#else X if (glob_ret == GLOB_NOMATCH) { X+#endif X fdprintf(out, "total 0\r\n"); X return 1; X } else if (glob_ret == GLOB_NOSPACE) { END-of-oftpd/files/patch-file_list.c echo x - oftpd/files/patch-ftp_command.c sed 's/^X//' >oftpd/files/patch-ftp_command.c << 'END-of-oftpd/files/patch-ftp_command.c' X--- src/ftp_command.c.old Sat Mar 31 11:43:43 2001 X+++ src/ftp_command.c Sat Mar 31 11:44:01 2001 X@@ -6,6 +6,7 @@ X #include X #include X #include X+#include X #include X #include X #include END-of-oftpd/files/patch-ftp_command.c echo x - oftpd/files/patch-af_portability.c sed 's/^X//' >oftpd/files/patch-af_portability.c << 'END-of-oftpd/files/patch-af_portability.c' X--- src/af_portability.h.old Sat Mar 31 12:00:46 2001 X+++ src/af_portability.h Sat Mar 31 12:01:00 2001 X@@ -2,6 +2,7 @@ X #define AF_PORTABILITY_H X X #include X+#include X #include X X /* _x_ must be a pointer to a sockaddr structure */ END-of-oftpd/files/patch-af_portability.c echo x - oftpd/files/patch-ftp_listener.c sed 's/^X//' >oftpd/files/patch-ftp_listener.c << 'END-of-oftpd/files/patch-ftp_listener.c' X--- src/ftp_listener.c.old Sat Mar 31 12:01:10 2001 X+++ src/ftp_listener.c Sat Mar 31 12:01:24 2001 X@@ -3,6 +3,7 @@ X */ X X #include X+#include X #include X #include X #include END-of-oftpd/files/patch-ftp_listener.c echo x - oftpd/files/patch-ftp_session.c sed 's/^X//' >oftpd/files/patch-ftp_session.c << 'END-of-oftpd/files/patch-ftp_session.c' X--- src/ftp_session.c.orig Thu Mar 29 00:41:18 2001 X+++ src/ftp_session.c Sat Mar 31 12:07:49 2001 X@@ -3,13 +3,13 @@ X */ X X #include X+#include X #include X #include X #include X #include X #include X #include X-#include X #include X #include X #include END-of-oftpd/files/patch-ftp_session.c echo x - oftpd/files/patch-configure sed 's/^X//' >oftpd/files/patch-configure << 'END-of-oftpd/files/patch-configure' X--- configure.old Sat Mar 31 12:13:17 2001 X+++ configure Sat Mar 31 12:14:16 2001 X@@ -1121,14 +1121,14 @@ X fi X X X-echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6 X-echo "configure:1126: checking for main in -lpthread" >&5 X+echo $ac_n "checking for main with -pthread""... $ac_c" 1>&6 X+echo "configure:1126: checking for main with -pthread" >&5 X ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'` X if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then X echo $ac_n "(cached) $ac_c" 1>&6 X else X ac_save_LIBS="$LIBS" X-LIBS="-lpthread $LIBS" X+LIBS="-pthread $LIBS" X cat > conftest.$ac_ext <&6 X@@ -2311,14 +2311,14 @@ X fi X done X X-echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 X-echo "configure:2316: checking for pthread_create in -lpthread" >&5 X+echo $ac_n "checking for pthread_create with -pthread""... $ac_c" 1>&6 X+echo "configure:2316: checking for pthread_create with -pthread" >&5 X ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` X if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then X echo $ac_n "(cached) $ac_c" 1>&6 X else X ac_save_LIBS="$LIBS" X-LIBS="-lpthread $LIBS" X+LIBS="$LIBS" X cat > conftest.$ac_ext <&6 END-of-oftpd/files/patch-configure exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message