Bug 115979 - xferlog doesn't honor TZ environment variable
Summary: xferlog doesn't honor TZ environment variable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: wu-ftpd
Version: 2.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-17 13:25 UTC by Neil Horman
Modified: 2007-11-30 22:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-03-15 11:12:03 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2004:096 0 normal SHIPPED_LIVE Important: wu-ftpd security update 2004-03-08 05:00:00 UTC

Description Neil Horman 2004-02-17 13:25:31 UTC
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):
2.6.1

How reproducible:
always

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 13:27:21 UTC
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 16:04:38 UTC
Will be fixed in the next erratum.

Comment 3 Samuel Stringham 2004-03-10 16:51:22 UTC
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 16:52:10 UTC
Created attachment 98430 [details]
fix for mktime() segfault

Comment 5 Neil Horman 2004-03-10 17:32:19 UTC
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 20:37:25 UTC
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 2004-03-30 14:38:47 UTC
RHBA-2004:135 is now pushed live


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