Simple Asynchronous File Transfer Reference Implementation.

PR:           4664
Submitted by: Stefan  Zehl <sec@42.org>
This commit is contained in:
Steve Price 1998-02-24 20:28:17 +00:00
parent 3ac1a22d9b
commit 42f0ca992d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=9910
7 changed files with 171 additions and 0 deletions

23
net/sendfile/Makefile Normal file
View file

@ -0,0 +1,23 @@
# New ports collection makefile for: sendfile
# Version required: 2.1
# Date created: 23 February 1998
# Whom: sec@42.org
#
# $Id$
#
DISTNAME= sendfile-2.1
CATEGORIES= net
MASTER_SITES= ftp://ftp.uni-stuttgart.de/pub/unix/comm/sendfile/current/
MAINTAINER= sec@42.org
WRKSRC= ${WRKDIR}/${PKGNAME}
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT=makeconfig
CONFIGURE_ENV= PREFIX="${PREFIX}"
MAN1= sendfile.1 sendmsg.1 receive.1
.include <bsd.port.mk>

1
net/sendfile/distinfo Normal file
View file

@ -0,0 +1 @@
MD5 (sendfile-2.1.tar.gz) = a8d4fefab7073e0602071512b1362267

View file

@ -0,0 +1,32 @@
--- makeconfig.org Tue Sep 30 21:54:25 1997
+++ makeconfig Tue Sep 30 21:55:50 1997
@@ -11,15 +11,15 @@
# default compiling settings
CC=gcc
-CFLAGS=-O2
+#CFLAGS=-O2
LDFLAGS=-s
# default installation settings
SPOOL=/var/spool/sendfile
-BINDIR=/usr/local/bin
-MANDIR=/usr/local/man
-CONFIG=/usr/local/etc
-SERVERDIR=/usr/local/sbin
+BINDIR=${PREFIX}/bin
+MANDIR=${PREFIX}/man
+CONFIG=${PREFIX}/etc
+SERVERDIR=${PREFIX}/sbin
INETDCONF=/etc/inetd.conf
SERVICES=/etc/services
@@ -33,7 +33,7 @@
#PGP=/usr/local/bin/pgp
#RECODE=/usr/local/bin/recode
#METAMAIL=/usr/local/bin/metamail
-#SENDMAIL=/usr/lib/sendmail
+SENDMAIL=/usr/sbin/sendmail
######################### END OF USER CONFIGURATION ##########################

View file

@ -0,0 +1,78 @@
--- develop/install.orig Tue Feb 24 14:06:09 1998
+++ develop/install Tue Feb 24 14:09:09 1998
@@ -98,31 +98,6 @@
if [ "$INETDCONF" = "" ]; then INETDCONF=/etc/inetd.conf; fi
if [ "$SERVICES" = "" ]; then SERVICES=/etc/services; fi
-cat <<EOD
-WARNING: this sendfile install script will create or write to:
-
- spool directory = $SPOOL
- binary directory = $BINDIR
- manual directory = $MANDIR
- sendfiled directory = $SERVERDIR
- configuration files = $CONFIG
- $DENY
-
-In /etc/services and /etc/inetd.conf apropriate ads will be inserted.
-In /etc/profile and /etc/csh.login a call to sendfile_check will be added.
-
-To deinstall the sendfile-daemon, simply type: rm $SERVERDIR/sendfiled
-
-EOD
-echo 'If you are satisfied with these defaults, then type "ok" now:'
-read answer
-if [ "$answer" != ok ]; then
- echo
- echo "You can install sendfile manually, too. Please type: more doc/README"
- echo
- exit
-fi
-
umask 022
echo "checking for directories"
@@ -234,33 +209,9 @@
fi
RESTART=true
echo "configuring $INETDCONF"
- echo "#" >>$INETDCONF
- echo "# simple asynchronous file transfer" >>$INETDCONF
echo "saft stream tcp nowait root $SFD" >>$INETDCONF
fi
-if [ -f /etc/inetd.sec ]; then
- if [ "`grep '^saft' /etc/inetd.sec`" = "" ]; then
- echo >> /etc/inetd.sec
- echo "saft allow" >> /etc/inetd.sec
- fi
-fi
-
-if [ -f /etc/profile ]; then
- if [ "`grep check_sendfile /etc/profile`" = "" ]; then
- echo "adding check_sendfile to /etc/profile"
- echo >>/etc/profile
- echo test -x $BINDIR/check_sendfile && $BINDIR/check_sendfile >>/etc/profile
- fi
-fi
-if [ -f /etc/csh.login ]; then
- if [ "`grep check_sendfile /etc/csh.login`" = "" ]; then
- echo "adding check_sendfile to /etc/csh.login"
- echo >>/etc/csh.login
- echo test -x $BINDIR/check_sendfile && $BINDIR/check_sendfile >>/etc/profile
- fi
-fi
-
if [ ! -d "$SPOOL/OUTGOING" ]; then
echo "creating $SPOOL"
mkdir_recursive $SPOOL/OUTGOING
@@ -303,9 +254,3 @@
echo "This will start an outgoing spooling sendfile daemon on boot time"
echo "which processes any old files in the outgoing spool."
echo
-
-if [ "$RESTART" = true ]; then
- echo
- echo "please restart now your inetd ( or simply reboot :-) )"
- echo
-fi

1
net/sendfile/pkg-comment Normal file
View file

@ -0,0 +1 @@
Simple Asynchronous File Transfer Reference Implementation.

11
net/sendfile/pkg-descr Normal file
View file

@ -0,0 +1,11 @@
SAFT (Simple Asynchronous File Transfer) is a new Internet protocol for
sending files and messages asynchronously. This is useful, because you don't
have to log on to the receiving site to do it. You simply tell the
sendfile program a file name and where to send it:
"sendfile your_file user@somedomain" (Of course there are options).
The package includes: A sendfile client (which sends files), a sendmsg
client (which sends messages), a receive client (which copies files from
the local sendfile spool to the recipient's current directory) and a
sendfiled server (which receives files and messages and stores them in the
local sendfile spool).

25
net/sendfile/pkg-plist Normal file
View file

@ -0,0 +1,25 @@
bin/check_sendfile
bin/receive
bin/sendfile
bin/sendmsg
bin/sf_cleanup
bin/utf7decode
bin/utf7encode
etc/sendfile.cf
etc/sendfile.deny
sbin/sendfiled
man/man1/receive.1.gz
man/man1/sendfile.1.gz
man/man1/sendmsg.1.gz
@exec mkdir -p /var/spool/sendfile/OUTGOING /var/spool/sendfile/LOG
@exec chmod 755 /var/spool/sendfile
@exec chmod 1777 /var/spool/sendfile/OUTGOING
@exec chmod 700 /var/spool/sendfile/LOG
@exec touch /var/spool/sendfile/LOG/in /var/spool/sendfile/LOG/out
@exec chmod 600 /var/spool/sendfile/LOG/in /var/spool/sendfile/LOG/out
@exec echo -e 'saft\tstream\ttcp\tnowait\troot\t/usr/local/sbin/sendfiled sendfiled' >> /etc/inetd.conf
@exec echo -e 'saft\t\t487/tcp\t# simple asynchronous file transfer'>>/etc/services
@exec kill -HUP `ps auxw|awk '$11 == "inetd" { print $2 } '`
@unexec perl -pi.bak -e '/^saft/ && ($_="")' /etc/inetd.conf
@unexec kill -HUP `ps auxw|awk '$11 == "inetd" { print $2 } '`
@unexec rm -R /var/spool/sendfile