svn commit: samba r11936 - in branches/SAMBA_3_0/source/rpc_server: .

jra at samba.org jra at samba.org
Sun Nov 27 21:51:47 GMT 2005


Author: jra
Date: 2005-11-27 21:51:46 +0000 (Sun, 27 Nov 2005)
New Revision: 11936

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11936

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:
   branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c	2005-11-27 20:53:07 UTC (rev 11935)
+++ branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c	2005-11-27 21:51:46 UTC (rev 11936)
@@ -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