Bug 57257 - SIZE command broken with latest errata update
Summary: SIZE command broken with latest errata update
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: wu-ftpd
Version: 6.2
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-07 23:03 UTC by Ion Badulescu
Modified: 2005-10-31 22:00 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-02-19 13:36:11 UTC
Embargoed:


Attachments (Terms of Use)

Description Ion Badulescu 2001-12-07 23:03:58 UTC
Description of Problem:
The 64bit support added in the last errata update results in a 64-bit
entity (stat.st_size) being passed to printf("%lu"), which totally breaks
on big endian (sparc) and breaks for size > 4G on little endian (i386). Any
ftp client which depends on SIZE working (e.g. ncftp) breaks badly, resume
support is non functional ... it is a REALLY bad regression from previous
versions.

Oh.. I marked this bug as a 6.2 bug, but I don't see anything to stop it
from breaking SIZE in the newer releases. ALL errata wu-ftpd's are broken,
but on i386 you won't see it unless you run SIZE on a file > 4GB.

Version-Release number of selected component (if applicable):
Latest errata (2.6.1-0.6x.21)

How Reproducible:
Always

Steps to Reproduce:
1. run ncftp against wu-ftpd running on a sparc, try to transfer a file
2. 
3. 

Actual Results:
A zero-length file is created on the client side.

Expected Results:
Umm.. take a wild guess

Additional Information:
This patch fixes it for me (only the configure.in patch is included, run
autoconf to rebuild configure itself). It's probably not the best solution,
but will work for Linux on all platforms.

[copy/paste, white space not preserved, etc]
diff -ur wu-ftpd/configure.in wu-ftpd.new/configure.in
--- wu-ftpd/configure.in        Wed Mar 28 11:48:59 2001
+++ wu-ftpd.new/configure.in    Thu Dec  6 21:58:02 2001
@@ -288,6 +288,7 @@
 if test "$result" = "yes"; then
        AC_DEFINE(_GNU_SOURCE, 1)
        AC_DEFINE(_FILE_OFFSET_BITS, 64)
+       AC_DEFINE(OFFSET_SIZE, 8)
 fi
 
 AC_CHECK_HEADERS(dirent.h regex.h shadow.h security/pam_appl.h opie.h skey.h \
diff -ur wu-ftpd/src/config.h.in wu-ftpd.new/src/config.h.in
--- wu-ftpd/src/config.h.in     Wed Mar 28 11:49:35 2001
+++ wu-ftpd.new/src/config.h.in Thu Dec  6 21:58:55 2001
@@ -31,6 +31,7 @@
 
 #undef _GNU_SOURCE
 #undef _FILE_OFFSET_BITS
+#undef OFFSET_SIZE
 #undef HAVE_FEATURES_H
 #ifdef HAVE_FEATURES_H
 #include <features.h>

Comment 1 Thomas Woerner 2004-02-19 13:36:11 UTC
Please use vsftpd, wu-ftpd is not maintained anymore.


Note You need to log in before you can comment on or make changes to this bug.