On Sun, Nov 07, 2010 at 05:30:37PM +0100, Philipp Kern wrote:
> vsftpd is compiled for s390, but broken on this architecture.  The authors
> apparently found it a good idea to call syscalls directly in sysdeputil.c.
> Sadly this doesn't appear to work for clone() on s390, as eglibc provides
> a wrapper for the syscall on this architecture.  Instead the code should
> call clone() in a sane way, i.e. reusing the function from eglibc instead
> of wrangling the syscalls by itself.
> 
> The result of this is vsftpd opening the socket just fine, with the child
> segfaulting in eglibc's syscall.S upon a new connection.

A band-aid fix that works is this one, which means falling back to fork().
This does users allow to login again.  I found it hard to dig up a proper
version of sys_clone(), which is used here, not clone()-like behaviour on s390
that behaves like fork().

diff --git a/sysdeputil.c b/sysdeputil.c
index 9dc8a5e..109f940 100644
--- a/sysdeputil.c
+++ b/sysdeputil.c
@@ -64,7 +64,7 @@
 #include <utmpx.h>
 
 /* BEGIN config */
-#if defined(__linux__)
+#if defined(__linux__) && !defined(__s390__)
   #include <errno.h>
   #include <syscall.h>
   #define VSF_SYSDEP_HAVE_LINUX_CLONE

Kind regards
Philipp Kern

Attachment: signature.asc
Description: Digital signature

Reply via email to