diff options
author | Jeremy Allison <jra@samba.org> | 2005-11-27 21:51:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:37 -0500 |
commit | add7cff52095b53646cf6907a557b4d1f17cb050 (patch) | |
tree | e82e7a88efc7372cd220ceb2d0d999ff44d46fc7 /source3/rpc_server | |
parent | d9f26f78f6325651b79f21e11fb1781c9cfafd78 (diff) | |
download | samba-add7cff52095b53646cf6907a557b4d1f17cb050.tar.gz samba-add7cff52095b53646cf6907a557b4d1f17cb050.tar.bz2 samba-add7cff52095b53646cf6907a557b4d1f17cb050.zip |
r11936: Fix bug in returning remote time found by Thomas Bork <tombork@web.de>.
get_time_zone() was overwriting static buffer returned by
gmtime(). Lars - this is a mandatory fix for the next patch...
Jeremy.
(This used to be commit 68d03a7a74738ce62e7531127aa4533147217e6d)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_srvsvc_nt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index a7162c929d..0e7ded39f5 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -1924,6 +1924,9 @@ WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET 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 @@ WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET t->tm_min, t->tm_sec, 0, - get_time_zone(unixdate)/60, + zone, 10000, t->tm_mday, t->tm_mon + 1, |