svn commit: samba r11937 - in trunk/source/rpc_server: .
jra at samba.org
jra at samba.org
Sun Nov 27 21:51:49 GMT 2005
Author: jra
Date: 2005-11-27 21:51:48 +0000 (Sun, 27 Nov 2005)
New Revision: 11937
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11937
Log:
Fix bug in returning remote time found by Thomas Bork <tombork at web.de>.
get_time_zone() was overwriting static buffer returned by
gmtime(). Lars - this is a mandatory fix for the next patch...
Jeremy.
Modified:
trunk/source/rpc_server/srv_srvsvc_nt.c
Changeset:
Modified: trunk/source/rpc_server/srv_srvsvc_nt.c
===================================================================
--- trunk/source/rpc_server/srv_srvsvc_nt.c 2005-11-27 21:51:46 UTC (rev 11936)
+++ trunk/source/rpc_server/srv_srvsvc_nt.c 2005-11-27 21:51:48 UTC (rev 11937)
@@ -1924,6 +1924,9 @@
TIME_OF_DAY_INFO *tod;
struct tm *t;
time_t unixdate = time(NULL);
+ /* We do this call first as if we do it *after* the gmtime call
+ it overwrites the pointed-to values. JRA */
+ uint32 zone = get_time_zone(unixdate)/60;
tod = TALLOC_P(p->mem_ctx, TIME_OF_DAY_INFO);
if (!tod)
@@ -1947,7 +1950,7 @@
t->tm_min,
t->tm_sec,
0,
- get_time_zone(unixdate)/60,
+ zone,
10000,
t->tm_mday,
t->tm_mon + 1,
More information about the samba-cvs
mailing list