Red Hat Bugzilla – Bug 115979
xferlog doesn't honor TZ environment variable
Last modified: 2007-11-30 17:06:53 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
Version-Release number of selected component (if applicable):
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
xferlog records transfer events with GMT timestamps
xferlog should record transfer events with timestamps offset for
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));
Will be fixed in the next erratum.
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.
Rackspace Fanatical Support
Created attachment 98430 [details]
fix for mktime() segfault
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
Please have a look at:
Will soon be released as erratum.
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.
Ok, here is the final version:
RHBA-2004:135 is now pushed live