Bug 57257 - SIZE command broken with latest errata update
SIZE command broken with latest errata update
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: wu-ftpd (Show other bugs)
6.2
All Linux
high Severity high
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-07 18:03 EST by Ion Badulescu
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-19 08:36:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ion Badulescu 2001-12-07 18:03:58 EST
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 08:36:11 EST
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.