Bug 115979 - xferlog doesn't honor TZ environment variable
xferlog doesn't honor TZ environment variable
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: wu-ftpd (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
Depends On:
  Show dependency treegraph
Reported: 2004-02-17 08:25 EST by Neil Horman
Modified: 2007-11-30 17:06 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-03-15 06:12:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to cause xferlog to record timestamps which honor local time zone (960 bytes, patch)
2004-02-17 08:27 EST, Neil Horman
no flags Details | Diff
fix for mktime() segfault (1.01 KB, patch)
2004-03-10 11:52 EST, Samuel Stringham
no flags Details | Diff

  None (edit)
Description Neil Horman 2004-02-17 08:25:31 EST
Description of problem:
writes to the wu-ftpd xferlog record timestamps using the time() call,
which ignores the use of the local timezone.  This results in all log
messages being recorded in GMT, rather than offset for the appropriate
time zone.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.configure the xferlog to record stor and recv events
2.configure wu-ftpd to be your ftp server 
3.log in to the server and transfer some files
Actual results:
xferlog records transfer events with GMT timestamps 

Expected results:
xferlog should record transfer events with timestamps offset for
configured timezone.

Additional info:
Comment 1 Neil Horman 2004-02-17 08:27:21 EST
Created attachment 97746 [details]
patch to cause xferlog to record timestamps which honor local time zone

the time calls which were used to get the time that gets written into xferlog
have been replaced with calls to mktime(localtime(NULL));
Comment 2 Thomas Woerner 2004-02-25 11:04:38 EST
Will be fixed in the next erratum.
Comment 3 Samuel Stringham 2004-03-10 11:51:22 EST
The patch that was released does not work.  Causes segmentation faults
in ftpd.  localtime(NULL) returns NULL.  mktime(NULL) will segfault. 
A patch that actually works will be attached.

Thank you,

Samuel Stringham
Rackspace Fanatical Support
Comment 4 Samuel Stringham 2004-03-10 11:52:10 EST
Created attachment 98430 [details]
fix for mktime() segfault
Comment 5 Neil Horman 2004-03-10 12:32:19 EST
your right. I'm sorry, I don't know how I got that in there.  I should
have called time(NULL first) and passed the address of the return
value to localtime as you did. apologies
Comment 7 Simon Brady 2004-03-17 15:37:25 EST
Hi Thomas, it looks like you've left the "%patch9" line out of the
spec file - as far as I can tell the updated
wu-ftpd-2.6.2-time_fix.patch doesn't get applied prior to build.
Comment 9 Mark J. Cox (Product Security) 2004-03-30 09:38:47 EST
RHBA-2004:135 is now pushed live

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