summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lutgens <lamer@gentoo.org>2001-07-05 03:48:03 +0000
committerBen Lutgens <lamer@gentoo.org>2001-07-05 03:48:03 +0000
commitab85afbe3a57d3fe2f75f789a860951860ebee4b (patch)
tree4d9e89426418caf3d7fa895b36c4af384b24328e /net-ftp/oftpd
parentnow makes sure you're root before running. (diff)
downloadgentoo-2-ab85afbe3a57d3fe2f75f789a860951860ebee4b.tar.gz
gentoo-2-ab85afbe3a57d3fe2f75f789a860951860ebee4b.tar.bz2
gentoo-2-ab85afbe3a57d3fe2f75f789a860951860ebee4b.zip
added oftpd a anonymous only ftp daemon that is quite secure, it uses
chroot() and lots of other sweet stuff. Please add these two lines FTPUSER="ftp" # User to run oftpd as FTPROOT="/home/ftp" # Set this to your ftproot for oftpd to your /etc/rc.d/config/basic and tune them to your needs to use oftpd
Diffstat (limited to 'net-ftp/oftpd')
-rw-r--r--net-ftp/oftpd/files/digest-oftpd-0.3.61
-rwxr-xr-xnet-ftp/oftpd/files/oftpd31
-rw-r--r--net-ftp/oftpd/oftpd-0.3.6.ebuild50
3 files changed, 82 insertions, 0 deletions
diff --git a/net-ftp/oftpd/files/digest-oftpd-0.3.6 b/net-ftp/oftpd/files/digest-oftpd-0.3.6
new file mode 100644
index 000000000000..bd6726479cb9
--- /dev/null
+++ b/net-ftp/oftpd/files/digest-oftpd-0.3.6
@@ -0,0 +1 @@
+MD5 78b4139bb0108297b9814564db986852 oftpd-0.3.6.tar.gz
diff --git a/net-ftp/oftpd/files/oftpd b/net-ftp/oftpd/files/oftpd
new file mode 100755
index 000000000000..1bc8d8d4a645
--- /dev/null
+++ b/net-ftp/oftpd/files/oftpd
@@ -0,0 +1,31 @@
+#!/bin/sh
+#RCUPDATE:2 3 4:75:This line is required for script management
+
+. /etc/rc.d/config/functions
+. /etc/rc.d/config/basic
+
+SERVICE="oftpd"
+opts="start stop restart"
+PIDFILE=/var/run/oftpd.pid
+EXE=/usr/sbin/oftpd
+
+start() {
+
+ ebegin "Starting $SERVICE"
+ start-stop-daemon --start --quiet --exec $EXE $FTPUSER $FTPROOT
+ eend $? "Started $SERVICE." "Error starting $SERVICE."
+}
+
+stop() {
+
+ ebegin "Stopping $SERVICE"
+ start-stop-daemon --stop --quiet -n $SERVICE --exec $EXE
+ eend $? "Stopped $SERVICE." "Error stopping $SERVICE."
+}
+
+restart() {
+ stop
+ start
+}
+
+doservice ${@}
diff --git a/net-ftp/oftpd/oftpd-0.3.6.ebuild b/net-ftp/oftpd/oftpd-0.3.6.ebuild
new file mode 100644
index 000000000000..e567c14bccd0
--- /dev/null
+++ b/net-ftp/oftpd/oftpd-0.3.6.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Ben Lutgens <lamer@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/oftpd/oftpd-0.3.6.ebuild,v 1.1 2001/07/05 03:48:03 lamer Exp $
+
+#P=
+#A=${P}.tar.gz
+S=${WORKDIR}/${P}
+DESCRIPTION="Secure, small anonymous only ftpd"
+SRC_URI="http://www.time-travellers.org/oftpd/${P}.tar.gz"
+HOMEPAGE="http://www.time-travellers.org/oftpd/"
+
+DEPEND=""
+
+src_compile() {
+
+
+# Broken upstream source. Won't compile with this enabled.
+#local myconf
+# if [ "`use ipv6`" ]; then
+# myconf="--enable-ipv6"
+#fi
+
+ try ./configure --prefix=/usr --bindir=/usr/sbin \
+ ${myconf} --mandir=/usr/share/man --host=${CHOST}
+ try make
+
+}
+
+src_install () {
+
+ try make DESTDIR=${D} install
+ dodoc AUTHORS BUGS COPYING INSTALL FAQ NEWS README TODO
+ exeinto /etc/rc.d/init.d
+ doexe ${FILESDIR}/oftpd
+
+# Am disabling this untill I can figure out how to make the daemon write a
+# pid file
+# doexe ${FILESDIR}/svc-oftpd
+# exeinto /var/lib/supervise/services/oftpd
+# doexe ${FILESDIR}/oftpd-run
+ dodir /home/ftp
+}
+
+pkg_postinst() {
+ einfo "Run \"rc-update add svc-oftpd\" to make the daemon start at boot"
+ einfo "Add FTPUSER=\"ftp\" and FTPROOT=\"/home/ftp\" to
+/etc/rc.d/config/basic"
+}
+