vapier 14/04/07 12:32:25
Modified: conf.d.oftpd-r7
Added: oftpd-0.3.7-error-output.patch
oftpd-0.3.7-pthread-cancel.patch
Log:
Fix timeout crashes and error message. Add a note about passive behavior and
default network settings.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key
D2E96200)
Revision Changes Path
1.4 net-ftp/oftpd/files/conf.d.oftpd-r7
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/oftpd/files/conf.d.oftpd-r7?rev=1.4&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/oftpd/files/conf.d.oftpd-r7?rev=1.4&content-type=text/plain
diff :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/oftpd/files/conf.d.oftpd-r7?r1=1.3&r2=1.4
Index: conf.d.oftpd-r7
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-ftp/oftpd/files/conf.d.oftpd-r7,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- conf.d.oftpd-r7 17 Jun 2011 00:46:31 -0000 1.3
+++ conf.d.oftpd-r7 7 Apr 2014 12:32:25 -0000 1.4
@@ -17,4 +17,10 @@
FTPPORT=21
## Uncoment this line to activate oftpd service
+# Note: in order for passive connections to work, you must specify an IP
address
+# here with the -i flag. You can make it listen to all IPv4 addresses:
+# -i 0.0.0.0
+# or make it listen to all IPv6 addresses:
+# -i ::1
+# By default, oftpd listens to all IPv4/IPv6 addresses, but passive mode fails.
#OFTPD_OPTS="-p ${FTPPORT} ${FTPUSER} ${FTPROOT}"
1.1 net-ftp/oftpd/files/oftpd-0.3.7-error-output.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/oftpd/files/oftpd-0.3.7-error-output.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/oftpd/files/oftpd-0.3.7-error-output.patch?rev=1.1&content-type=text/plain
Index: oftpd-0.3.7-error-output.patch
===================================================================
fix writing of the error message to stderr by processing the varargs
--- a/src/error.c
+++ b/src/error.c
@@ -23,7 +23,6 @@ void error_init(error_t *err, int error_code, const char
*desc_fmt, ...)
{
va_list args;
- fprintf(stderr, "error_init: %d %s", error_code, desc_fmt);
daemon_assert(err != NULL);
daemon_assert(error_code >= 0);
daemon_assert(desc_fmt != NULL);
@@ -32,6 +31,7 @@ void error_init(error_t *err, int error_code, const char
*desc_fmt, ...)
va_start(args, desc_fmt);
vsnprintf(err->desc, sizeof(err->desc), desc_fmt, args);
va_end(args);
+ fprintf(stderr, "error_init: %d %s\n", error_code, err->desc);
daemon_assert(invariant(err));
}
1.1 net-ftp/oftpd/files/oftpd-0.3.7-pthread-cancel.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/oftpd/files/oftpd-0.3.7-pthread-cancel.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-ftp/oftpd/files/oftpd-0.3.7-pthread-cancel.patch?rev=1.1&content-type=text/plain
Index: oftpd-0.3.7-pthread-cancel.patch
===================================================================
in order for pthread_cancel to work (which oftpd uses to close inactive
connections), most ports need to load libgcc_s.so.1. but when oftpd uses
a chroot, that file is no longer available (in fact, it'll try to load it
from the chroot itself which is kind of a security issue). so have the
code proactively link against libgcc_s when it is found so that the lib
is already loaded when we cancel.
--- a/configure.in
+++ b/configure.in
@@ -39,6 +39,7 @@ AC_FUNC_STRFTIME
AC_CHECK_FUNCS(getcwd gettimeofday select socket strerror localtime_r gmtime_r)
dnl AC_CHECK_LIB(pthread, pthread_create)
dnl AC_SEARCH_LIBS(pthread_create, [ pthread pthreads thread threads ])
+AC_CHECK_LIB(gcc_s, _Unwind_Resume)
AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(inet_ntoa, nsl)
AC_CHECK_FUNCS(inet_aton)