From 06dd5c1a282db9ce1349f126aa63e9c439e37756 Mon Sep 17 00:00:00 2001 From: steve Date: Sat, 29 Jan 2000 07:15:20 +0000 Subject: Adding fhttpd version 0.4.2. A C++-based FTP/HTTP server that supports modules. PR: 15804 Submitted by: Will Andrews --- www/fhttpd/Makefile | 58 +++++++++++++++++++++++++++++++++ www/fhttpd/distinfo | 1 + www/fhttpd/files/fhttpd.sh | 2 ++ www/fhttpd/files/patch-aa | 18 +++++++++++ www/fhttpd/files/patch-ab | 80 ++++++++++++++++++++++++++++++++++++++++++++++ www/fhttpd/files/patch-ac | 36 +++++++++++++++++++++ www/fhttpd/files/patch-ad | 11 +++++++ www/fhttpd/files/patch-ae | 20 ++++++++++++ www/fhttpd/files/patch-af | 47 +++++++++++++++++++++++++++ www/fhttpd/pkg-comment | 1 + www/fhttpd/pkg-descr | 15 +++++++++ www/fhttpd/pkg-plist | 46 ++++++++++++++++++++++++++ 12 files changed, 335 insertions(+) create mode 100644 www/fhttpd/Makefile create mode 100644 www/fhttpd/distinfo create mode 100644 www/fhttpd/files/fhttpd.sh create mode 100644 www/fhttpd/files/patch-aa create mode 100644 www/fhttpd/files/patch-ab create mode 100644 www/fhttpd/files/patch-ac create mode 100644 www/fhttpd/files/patch-ad create mode 100644 www/fhttpd/files/patch-ae create mode 100644 www/fhttpd/files/patch-af create mode 100644 www/fhttpd/pkg-comment create mode 100644 www/fhttpd/pkg-descr create mode 100644 www/fhttpd/pkg-plist (limited to 'www/fhttpd') diff --git a/www/fhttpd/Makefile b/www/fhttpd/Makefile new file mode 100644 index 000000000000..fe297573e67e --- /dev/null +++ b/www/fhttpd/Makefile @@ -0,0 +1,58 @@ +# New ports collection makefile for: fhttpd +# Version required: 0.4.2 +# Date created: 21 Dec 1999 +# Whom: Will Andrews +# +# $FreeBSD$ +# + +DISTNAME= fhttpd-0.4.2 +CATEGORIES= www +MASTER_SITES= ftp://ftp.fhttpd.org/ + +MAINTAINER= andrews@technologist.com + +LOGFILE= share/fhttpd/fhttpd.log +PLIST_SUB+= LOGFILE=${LOGFILE} + +post-extract: + @${CP} ${FILESDIR}/fhttpd.sh ${WRKSRC} + +pre-patch: + (cd ${WRKSRC} && ${TAR} xf http-root.tar) + +pre-install: + ${RM} -rf ${WRKSRC}/http-root/pub/dummy_directory + ${PERL} -pi -e "s:/usr/local:${PREFIX}:g" ${WRKSRC}/fhttpd.sh + ${PERL} -pi -e "s:%%LOGFILE%%:${PREFIX}/${LOGFILE}:g" ${WRKSRC}/fhttpd.sh + ${PERL} -pi -e "s:/usr/local:${PREFIX}:g" ${WRKSRC}/http-root/root-fhttpd.conf + ${PERL} -pi -e "s:%%LOGFILE%%:${PREFIX}/${LOGFILE}:g" ${WRKSRC}/http-root/root-fhttpd.conf + +do-install: + ${MKDIR} ${PREFIX}/etc/rc.d + ${INSTALL_SCRIPT} ${WRKSRC}/fhttpd.sh ${PREFIX}/etc/rc.d +.for PROG in fhttpd fhttpd-file fhttpd-log + ${INSTALL_PROGRAM} ${WRKSRC}/${PROG} ${PREFIX}/sbin +.endfor + ${INSTALL_DATA} ${WRKSRC}/http-root/root-fhttpd.conf ${PREFIX}/etc/fhttpd.conf + ${MKDIR} ${PREFIX}/share/fhttpd/bin + ${INSTALL_SCRIPT} ${WRKSRC}/http-root/bin/* ${PREFIX}/share/fhttpd/bin + ${MKDIR} ${PREFIX}/share/fhttpd/cgi-bin + ${INSTALL_SCRIPT} ${WRKSRC}/http-root/cgi-bin/f* ${PREFIX}/share/fhttpd/cgi-bin + ${INSTALL_DATA} ${WRKSRC}/http-root/cgi-bin/.index.html ${PREFIX}/share/fhttpd/cgi-bin + ${MKDIR} ${PREFIX}/share/fhttpd/incoming +.for DIR in icons private pub + ${MKDIR} ${PREFIX}/share/fhttpd/${DIR} + ${INSTALL_DATA} ${WRKSRC}/http-root/${DIR}/* ${PREFIX}/share/fhttpd/${DIR}/ +.endfor +.for DIR in private pub + ${INSTALL_DATA} ${WRKSRC}/http-root/${DIR}/.[fhi]* ${PREFIX}/share/fhttpd/${DIR}/ +.endfor +.for FILE in index.html noaccess.html + ${INSTALL_DATA} ${WRKSRC}/http-root/${FILE} ${PREFIX}/share/fhttpd/ +.endfor + +post-install: + ${TOUCH} ${PREFIX}/${LOGFILE} + +.include diff --git a/www/fhttpd/distinfo b/www/fhttpd/distinfo new file mode 100644 index 000000000000..fe4775d17a90 --- /dev/null +++ b/www/fhttpd/distinfo @@ -0,0 +1 @@ +MD5 (fhttpd-0.4.2.tar.gz) = 8e9d614b1211c79b81011d227e652da9 diff --git a/www/fhttpd/files/fhttpd.sh b/www/fhttpd/files/fhttpd.sh new file mode 100644 index 000000000000..51bbd8b71eeb --- /dev/null +++ b/www/fhttpd/files/fhttpd.sh @@ -0,0 +1,2 @@ +#!/bin/sh +[ -x /usr/local/sbin/fhttpd ] && /usr/local/sbin/fhttpd -c /usr/local/etc/fhttpd.conf -l /usr/local/share/fhttpd/fhttpd.log >/dev/null 2>&1 && echo -n " fhttpd" diff --git a/www/fhttpd/files/patch-aa b/www/fhttpd/files/patch-aa new file mode 100644 index 000000000000..e77d46f8f9d3 --- /dev/null +++ b/www/fhttpd/files/patch-aa @@ -0,0 +1,18 @@ +--- pseudopoll.c Mon Feb 9 10:48:42 1998 ++++ pseudopoll.c.new Fri Dec 24 00:12:58 1999 +@@ -3,7 +3,6 @@ + */ + + #ifdef PSEUDOPOLL +-#include "pseudopoll.h" + #include + #include + #include +@@ -11,6 +10,7 @@ + #include + #include + #include ++#include + + #ifdef NEED_SELECT_H + #include diff --git a/www/fhttpd/files/patch-ab b/www/fhttpd/files/patch-ab new file mode 100644 index 000000000000..4788284eac1c --- /dev/null +++ b/www/fhttpd/files/patch-ab @@ -0,0 +1,80 @@ +--- http-root/root-fhttpd.conf Mon Apr 19 13:31:49 1999 ++++ http-root/root-fhttpd.conf.new Fri Dec 24 19:29:00 1999 +@@ -5,7 +5,7 @@ + + # HTTP root directory + # +-HTTPRoot /home/ftp ++HTTPRoot /usr/local/share/fhttpd + + # honor Keep-Alive option + # +@@ -44,19 +44,19 @@ + # access control + # + AccessRealm system /etc/passwd +-AccessRealm http_users /etc/passwd.http_users +-AccessRights /home/ftp/private* restrict +-AccessRights /home/ftp/private* http_users default ++#AccessRealm http_users /etc/passwd.http_users ++AccessRights /usr/local/share/fhttpd/private* restrict ++#AccessRights /usr/local/share/fhttpd/private* http_users default + + # finger redirected to script + # +-PipeOutExec */fingerlocal /home/ftp/bin/finger-nohtml +-AbsPipeOutExec /home/ftp/fingerlocal.html\ +- /home/ftp/cgi-bin/finger @localhost ++PipeOutExec */fingerlocal /usr/local/share/fhttpd/bin/finger-nohtml ++#AbsPipeOutExec /home/ftp/fingerlocal.html\ ++# /home/ftp/cgi-bin/finger @localhost + + # directories with executables + # +-ExecMask /home/ftp/cgi-bin/* ++ExecMask /usr/local/share/fhttpd/cgi-bin/* + + # default header and footer + # +@@ -92,8 +92,8 @@ + + # CD-ROM + # +-AbsDirType /home/ftp/cdrom
_ _ ++#AbsDirType /home/ftp/cdrom
_ _ + + # "folder" icon for directory + # +@@ -287,11 +287,11 @@ + + # preloaded files + # +-PreLoad - /home/ftp/file_index.html +-PreLoad /icons/folder.gif /home/ftp/icons/folder.gif +-PreLoad /icons/html.gif /home/ftp/icons/html.gif +-PreLoad /icons/text.gif /home/ftp/icons/text.gif +-PreLoad /icons/image.gif /home/ftp/icons/image.gif ++#PreLoad - /home/ftp/file_index.html ++PreLoad /icons/folder.gif /usr/local/share/fhttpd/icons/folder.gif ++PreLoad /icons/html.gif /usr/local/share/fhttpd/icons/html.gif ++PreLoad /icons/text.gif /usr/local/share/fhttpd/icons/text.gif ++PreLoad /icons/image.gif /usr/local/share/fhttpd/icons/image.gif + + # applications + # +@@ -305,11 +305,11 @@ + # default application + # + Application fhttpd-file - ftp 3000,30 1 * \ +-/usr/local/sbin/fhttpd-file -s -u 022 -c /etc/fhttpd.conf ++/usr/local/sbin/fhttpd-file -s -u 022 -c /usr/local/etc/fhttpd.conf + + # log aplication + # + LogApplication log - ftp 1 1 - \ +-/usr/local/sbin/fhttpd-log -u 022 -c /etc/fhttpd.conf -l /tmp/fhttpd-log.log ++/usr/local/sbin/fhttpd-log -u 022 -c /usr/local/etc/fhttpd.conf -l %%LOGFILE%% + + # EOF diff --git a/www/fhttpd/files/patch-ac b/www/fhttpd/files/patch-ac new file mode 100644 index 000000000000..5772321b6055 --- /dev/null +++ b/www/fhttpd/files/patch-ac @@ -0,0 +1,36 @@ +--- Makefile Mon Apr 19 13:38:56 1999 ++++ Makefile.new Fri Dec 24 00:14:18 1999 +@@ -99,21 +99,21 @@ + + ## for Linux (glibc2/libc 6): + # +-COPTS = -Wall -O3 -felide-constructors -DLS_OPTIONS_IGNORE\ +- -DNEED_CRYPT_H -DCMSG_DATA_IS_A_MACRO \ +- -DMMAPPAGESIZE=65536 -DSIGARGS="int sig" -DSIGACTARGS="int sig"\ +- -D__s32=int\ +- -DGLOBAL_TIMEZONE -DGLIBC -DERRNO_DEFINED # -DFLOCK +-LFLAGS= -lcrypt ++#COPTS = -Wall -O3 -felide-constructors -DLS_OPTIONS_IGNORE\ ++# -DNEED_CRYPT_H -DCMSG_DATA_IS_A_MACRO \ ++# -DMMAPPAGESIZE=65536 -DSIGARGS="int sig" -DSIGACTARGS="int sig"\ ++# -D__s32=int\ ++# -DGLOBAL_TIMEZONE -DGLIBC -DERRNO_DEFINED # -DFLOCK ++#LFLAGS= -lcrypt + + ## for FreeBSD 2.2: + # +-#COPTS = -O2 -fno-strength-reduce -DLS_OPTIONS_IGNORE\ +-# -D__s32=int -DMMAPPAGESIZE=65536\ +-# -DPSEUDOPOLL -DCMSG_DATA_IS_A_MACRO\ +-# -DSIGARGS="int sig" -DSIGACTARGS="int sig"\ +-# -DTM_GMTOFF_PRESENT -DERRNO_DEFINED # -DFLOCK +-#LFLAGS = -lcrypt ++COPTS = -O2 -fno-strength-reduce -DLS_OPTIONS_IGNORE\ ++ -D__s32=int -DMMAPPAGESIZE=65536\ ++ -DPSEUDOPOLL -DCMSG_DATA_IS_A_MACRO\ ++ -DSIGARGS="int sig" -DSIGACTARGS="int sig"\ ++ -DTM_GMTOFF_PRESENT -DERRNO_DEFINED # -DFLOCK ++LFLAGS = -lcrypt + + # End of OS-dependent definitions + diff --git a/www/fhttpd/files/patch-ad b/www/fhttpd/files/patch-ad new file mode 100644 index 000000000000..eae416162010 --- /dev/null +++ b/www/fhttpd/files/patch-ad @@ -0,0 +1,11 @@ +--- log.cc.orig Sat Jan 29 00:53:07 2000 ++++ log.cc Sat Jan 29 00:54:02 2000 +@@ -688,7 +688,7 @@ + if(client){ + sprintf(tmpstr,"%d",currentconnection->socket->port); + SendLogMessage(client,NULL,NULL,NULL,0,"CLIENT_EXISTS_LOCAL_PORT",tmpstr); +- if(!getsockname(currentconnection->gethandle(),(sockaddr*)&currsock,&currsockaddrlen)){ ++ if(!getsockname(currentconnection->gethandle(),(sockaddr*)&currsock,(socklen_t*)&currsockaddrlen)){ + SendLogMessage(client,NULL,NULL,NULL,0,"CLIENT_EXISTS_LOCAL_IP",inet_ntoa(currsock.sin_addr)); + } + SendLogMessage(client,NULL,NULL,NULL,0,"CLIENT_EXISTS_IP",inet_ntoa(((sockaddr_in*)currentconnection->getaddress())->sin_addr)); diff --git a/www/fhttpd/files/patch-ae b/www/fhttpd/files/patch-ae new file mode 100644 index 000000000000..4870350a46aa --- /dev/null +++ b/www/fhttpd/files/patch-ae @@ -0,0 +1,20 @@ +--- sockobj.cc.orig Sat Jan 29 00:54:37 2000 ++++ sockobj.cc Sat Jan 29 00:55:34 2000 +@@ -645,7 +645,7 @@ + global_nconnections++; + if(xsocket->status==0){ + hisaddresslength=128; +- h=accept(xsocket->gethandle(),(struct sockaddr*)s,&hisaddresslength); ++ h=accept(xsocket->gethandle(),(struct sockaddr*)s,(socklen_t*)&hisaddresslength); + if(h<0) return; + hisaddress=(struct sockaddr*)malloc(hisaddresslength); + if(hisaddress) memcpy(hisaddress,s,hisaddresslength); else{ +@@ -1861,7 +1861,7 @@ + if(fdarray[sockets[i]->handleindexforwheel].revents&POLLIN){ + fdarray[sockets[i]->handleindexforwheel].revents&=~POLLIN; + hisaddresslength=128; +- h=accept(sockets[i]->gethandle(),(struct sockaddr*)s,&hisaddresslength); ++ h=accept(sockets[i]->gethandle(),(struct sockaddr*)s,(socklen_t*)&hisaddresslength); + if(h>=0){ + #ifdef DEBUG + log("Wheel::onepass: accepting connection"); diff --git a/www/fhttpd/files/patch-af b/www/fhttpd/files/patch-af new file mode 100644 index 000000000000..ca2207378b0d --- /dev/null +++ b/www/fhttpd/files/patch-af @@ -0,0 +1,47 @@ +--- fhttpd.cc.orig Sat Jan 29 00:56:40 2000 ++++ fhttpd.cc Sat Jan 29 00:58:31 2000 +@@ -130,7 +130,7 @@ + basedir[255]=0; + strncpy(username,globalhttppw->pw_name,128); + username[128]=0; +-if(!getsockname(connection->gethandle(),(sockaddr*)&currsock,&currsockaddrlen)){ ++if(!getsockname(connection->gethandle(),(sockaddr*)&currsock,(socklen_t*)&currsockaddrlen)){ + AddressRoot *curraddrroot=(AddressRoot*)addressroots.start; + while(curraddrroot){ + if((*((__s32*)&currsock.sin_addr))==curraddrroot->address){ +@@ -250,7 +250,7 @@ + if(c->socket){ + sprintf(tmpstr,"%d",c->socket->port); + LogMessage(this,NULL,NULL,NULL,0,"LOCAL_PORT",tmpstr); +- if(!getsockname(c->gethandle(),(sockaddr*)&currsock,&currsockaddrlen)){ ++ if(!getsockname(c->gethandle(),(sockaddr*)&currsock,(socklen_t*)&currsockaddrlen)){ + LogMessage(this,NULL,NULL,NULL,0,"LOCAL_IP",inet_ntoa(currsock.sin_addr)); + } + LogMessage(this,NULL,NULL,NULL,0,"IP",inet_ntoa(((sockaddr_in*)c->getaddress())->sin_addr)); +@@ -349,7 +349,7 @@ + if(servertype==ftp_server_port){ + strncpy(tmphostname,hostname,256); + tmphostname[255]=0; +- if(!getsockname(client->gethandle(),(sockaddr*)&currsock,&currsockaddrlen)){ ++ if(!getsockname(client->gethandle(),(sockaddr*)&currsock,(socklen_t*)&currsockaddrlen)){ + AddressRoot *curraddrroot=(AddressRoot*)addressroots.start; + while(curraddrroot){ + if((*((__s32*)&currsock.sin_addr))==curraddrroot->address){ +@@ -2554,7 +2554,7 @@ + if(blength>253) param[1][253]=0; + }else ((ControlFTPServerApp*)client->app)->trailingslash=1; + j=0; +- if(getsockname(client->gethandle(),(sockaddr*)&currsock,&currsockaddrlen)){ ++ if(getsockname(client->gethandle(),(sockaddr*)&currsock,(socklen_t*)&currsockaddrlen)){ + (*((__s32*)&currsock.sin_addr))=-1; + } + +@@ -3139,7 +3139,7 @@ + + struct sockaddr_in currsock; + sockaddr_size_type currsockaddrlen=sizeof(currsock); +- if(!getsockname(client->gethandle(),(sockaddr*)&currsock,&currsockaddrlen)){ ++ if(!getsockname(client->gethandle(),(sockaddr*)&currsock,(socklen_t*)&currsockaddrlen)){ + AddressRoot *curraddrroot=(AddressRoot*)addressroots.start; + while(curraddrroot){ + if((*((__s32*)&currsock.sin_addr))==curraddrroot->address){ diff --git a/www/fhttpd/pkg-comment b/www/fhttpd/pkg-comment new file mode 100644 index 000000000000..be78b5dce7c5 --- /dev/null +++ b/www/fhttpd/pkg-comment @@ -0,0 +1 @@ +C++-based FTP/HTTP server that supports modules diff --git a/www/fhttpd/pkg-descr b/www/fhttpd/pkg-descr new file mode 100644 index 000000000000..021f0c7b5732 --- /dev/null +++ b/www/fhttpd/pkg-descr @@ -0,0 +1,15 @@ +FHTTPD is a relatively new HTTP/FTP daemon that supports modules, +in particular, for PHP3. It's a feasible alternative to Apache, +but only for certain situations (for reasons given below). For +example, if one wishes only to run one daemon for both the FTP +and HTTP services, they can do that with FHTTPD. + +Unfortunately, at this time, FHTTPD does not seem to offer the +capability of running as non-root after binding to privileged +ports. Not to mention that the code itself is not very +self-documenting... it is of a poor programming style. + +WWW: http://www.illtel.com/pub/fhttpd/ +Author: Alex Belits + +--Will diff --git a/www/fhttpd/pkg-plist b/www/fhttpd/pkg-plist new file mode 100644 index 000000000000..5762ff24aff7 --- /dev/null +++ b/www/fhttpd/pkg-plist @@ -0,0 +1,46 @@ +etc/fhttpd.conf +%%LOGFILE%% +sbin/fhttpd +sbin/fhttpd-file +sbin/fhttpd-log +share/fhttpd/bin/finger-nohtml +share/fhttpd/cgi-bin/.index.html +share/fhttpd/cgi-bin/finger +share/fhttpd/cgi-bin/fortune +share/fhttpd/icons/at_work.gif +share/fhttpd/icons/audio.gif +share/fhttpd/icons/audio.xbm +share/fhttpd/icons/binary.gif +share/fhttpd/icons/binary.xbm +share/fhttpd/icons/c_text.gif +share/fhttpd/icons/c_text.xbm +share/fhttpd/icons/cdromicon.gif +share/fhttpd/icons/exec.gif +share/fhttpd/icons/folder.gif +share/fhttpd/icons/folder.xbm +share/fhttpd/icons/ftp.gif +share/fhttpd/icons/html.gif +share/fhttpd/icons/html.xbm +share/fhttpd/icons/image.gif +share/fhttpd/icons/image.xbm +share/fhttpd/icons/movie.gif +share/fhttpd/icons/text.gif +share/fhttpd/icons/text.xbm +share/fhttpd/index.html +share/fhttpd/noaccess.html +share/fhttpd/private/.footer.html +share/fhttpd/private/.header.html +share/fhttpd/private/.index.html +share/fhttpd/private/dummy_file +share/fhttpd/private/dummy_file.html +share/fhttpd/pub/.footer.html +share/fhttpd/pub/.header.html +share/fhttpd/pub/.index.html +share/fhttpd/pub/dummy_file.html +@dirrm share/fhttpd/bin +@dirrm share/fhttpd/cgi-bin +@dirrm share/fhttpd/icons +@dirrm share/fhttpd/incoming +@dirrm share/fhttpd/private +@dirrm share/fhttpd/pub +@dirrm share/fhttpd -- cgit