add oftp with proper ipv6 patch
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1805 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
parent
b6e2a3a7d4
commit
abb675cbe2
6
net-ftp/oftpd/Manifest
Normal file
6
net-ftp/oftpd/Manifest
Normal file
@ -0,0 +1,6 @@
|
||||
AUX conf.d.oftpd-r1 578 RMD160 84ba38720a6a2ac8f0873ebbc4cab82f0394232c SHA1 821a500ff9a3d8e35f7aaf39c4c3935546399ae1 SHA256 6ba360cac50935ee9c8ed2961b95e57d7c63c5f63dc0ce7befb942756e054f62
|
||||
AUX init.d.oftpd-r1 722 RMD160 3e24790f4d56d2eff46ce810c8433a10f852c1ad SHA1 49e4d235f382eedd24b25955c1cf2764a94ee08b SHA256 cd3c98cc8bc3255503d9cc9946749d53d90410bf9d4c0a3a9ddb6819c87ab84e
|
||||
AUX oftpd-0.3.7-family-1.patch 936 RMD160 0668323bb69fac190d8b1c4bcb0f5ed1c9c2b692 SHA1 945970c75cd4d23b4027f72521f4390a8b8ee4e6 SHA256 fe903d6fbb4a523f7b85dfb4c112f489da07764e8d67e15faa9b8380d400ba2a
|
||||
AUX oftpd-0.3.7-ipv6rel2-1.patch 44765 RMD160 563fafe68e9e1be6b96116b7ae0c24204147b6f7 SHA1 5b7fd9a9b46cdcb2e3d081bdecb255b584826d42 SHA256 4ae576a749c26dd66432c273ec71c0d7fc34a4159cd7fd7760e484304eeb1ccc
|
||||
DIST oftpd-0.3.7.tar.gz 97364 RMD160 9430607bf0c51847a4e4cc97c84be0495c931183 SHA1 d6d3ce43c009bb68736d50739e9a2f60bede99c1 SHA256 b135cd2bc6c54e03e5374845964eab73d5e567160c15bb4226c1c922b1e6d64e
|
||||
EBUILD oftpd-0.3.7-r4.ebuild 1030 RMD160 0754f5ee486989d5703e9215b9765678d757fcb4 SHA1 65b01a4c08f8c5fe47e49c15388939fa9438173e SHA256 96739a8ff08100c97ca1d0f00bf5e5f803e7eb563ee8e9cc1bd85eced93ea4ad
|
17
net-ftp/oftpd/files/conf.d.oftpd-r1
Normal file
17
net-ftp/oftpd/files/conf.d.oftpd-r1
Normal file
@ -0,0 +1,17 @@
|
||||
# Please read the oftd(8) man page for a more detailed explaination of these
|
||||
# variables.
|
||||
#
|
||||
# FTPUSER (user-name in the man page):
|
||||
# Set this variable to the user to run the ftp daemon as
|
||||
FTPUSER=ftp
|
||||
|
||||
# FTPROOT (root-directory in the man page):
|
||||
# The server uses chroot(2) to change the root directory of the server to this
|
||||
# directory. When a user connects, this is the directory that they will start
|
||||
# in, and is the top of their directory tree.
|
||||
#
|
||||
FTPROOT=/home/ftp
|
||||
|
||||
# FTPPORT (TCP port)
|
||||
# 22 is the standard ftp port, but you can change it here to something else
|
||||
FTPPORT=22
|
29
net-ftp/oftpd/files/init.d.oftpd-r1
Normal file
29
net-ftp/oftpd/files/init.d.oftpd-r1
Normal file
@ -0,0 +1,29 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2004 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-ftp/oftpd/files/init.d.oftpd-r1,v 1.3 2009/06/13 19:31:06 grobian Exp $
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ -z "${FTPUSER}" ] || [ -z "${FTPROOT}" ] || [ -z "${FTPPORT}" ] ; then
|
||||
eerror "You need to setup FTPUSER, FTPROOT and FTPPORT in /etc/conf.d/oftpd"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
|
||||
ebegin "Starting oftpd"
|
||||
start-stop-daemon --start --exec /usr/sbin/oftpd -- -p ${FTPPORT} ${FTPUSER} ${FTPROOT}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping oftpd"
|
||||
start-stop-daemon --stop --quiet --exec /usr/sbin/oftpd
|
||||
eend $?
|
||||
}
|
23
net-ftp/oftpd/files/oftpd-0.3.7-family-1.patch
Normal file
23
net-ftp/oftpd/files/oftpd-0.3.7-family-1.patch
Normal file
@ -0,0 +1,23 @@
|
||||
Submitted By: Mario Fetka (geos_one) (mario dot fetka at gmail dot com)
|
||||
Date: 2010-01-05
|
||||
Initial Package Version: 0.3.7
|
||||
Origin: http://gentoo.mirror.solnet.ch/net-ftp/oftpd/files/oftpd-0.3.7-family.patch
|
||||
Upstream Status: unkonwn
|
||||
Description: dont crash on wrong protocol family
|
||||
|
||||
diff -Naur oftpd-0.3.7.orig/src/ftp_session.c oftpd-0.3.7/src/ftp_session.c
|
||||
--- oftpd-0.3.7.orig/src/ftp_session.c 2010-01-05 21:56:48.540303543 +0000
|
||||
+++ oftpd-0.3.7/src/ftp_session.c 2010-01-05 21:57:29.995553119 +0000
|
||||
@@ -708,10 +708,12 @@
|
||||
if ((((struct sockaddr *)host_port)->sa_family != AF_INET) &&
|
||||
(((struct sockaddr *)host_port)->sa_family != AF_INET6)) {
|
||||
reply(f, 521, "Only IPv4 and IPv6 supported, address families (4,6)");
|
||||
+ return;
|
||||
}
|
||||
#else
|
||||
if (((struct sockaddr *)host_port)->sa_family != AF_INET) {
|
||||
reply(f, 521, "Only IPv4 supported, address family (4)");
|
||||
+ return;
|
||||
}
|
||||
#endif
|
||||
|
1308
net-ftp/oftpd/files/oftpd-0.3.7-ipv6rel2-1.patch
Normal file
1308
net-ftp/oftpd/files/oftpd-0.3.7-ipv6rel2-1.patch
Normal file
File diff suppressed because it is too large
Load Diff
40
net-ftp/oftpd/oftpd-0.3.7-r5.ebuild
Normal file
40
net-ftp/oftpd/oftpd-0.3.7-r5.ebuild
Normal file
@ -0,0 +1,40 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=2
|
||||
inherit eutils autotools
|
||||
|
||||
DESCRIPTION="Secure, small, anonymous only ftpd"
|
||||
HOMEPAGE="http://www.time-travellers.org/oftpd"
|
||||
SRC_URI="http://www.time-travellers.org/oftpd/${P}.tar.gz"
|
||||
|
||||
LICENSE="as-is"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sh ~sparc ~x86"
|
||||
IUSE="ipv6"
|
||||
|
||||
DEPEND="net-ftp/ftpbase"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/oftpd-0.3.7-ipv6rel2-1.patch
|
||||
# Don't crash when using an unsupported address family, #159178.
|
||||
epatch "${FILESDIR}"/oftpd-0.3.7-family-1.patch
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# local myconf
|
||||
# ipv6 support busted according to lamer
|
||||
# use ipv6 && myconf="${myconf} --enable-ipv6"
|
||||
econf --bindir=/usr/sbin $(use_enable ipv6) || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die
|
||||
dodoc AUTHORS BUGS FAQ NEWS README TODO
|
||||
keepdir /home/ftp
|
||||
newinitd "${FILESDIR}"/init.d.oftpd-r1 oftpd
|
||||
newconfd "${FILESDIR}"/conf.d.oftpd-r1 oftpd
|
||||
}
|
Loading…
Reference in New Issue
Block a user