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:
geos_one
2010-01-05 22:09:27 +00:00
parent b6e2a3a7d4
commit abb675cbe2
6 changed files with 1423 additions and 0 deletions

View 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

View 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 $?
}

View 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

File diff suppressed because it is too large Load Diff