summaryrefslogtreecommitdiff
path: root/source3/smbd/negprot.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-11-05 04:21:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:19 -0500
commit6d5757395a0e54245543794d0d6d6d6a32cd857a (patch)
treecdf48f97df8be03543172690524ddf6332a389a2 /source3/smbd/negprot.c
parent65ed4d3efda243f526131fd145c72647785f9906 (diff)
downloadsamba-6d5757395a0e54245543794d0d6d6d6a32cd857a.tar.gz
samba-6d5757395a0e54245543794d0d6d6d6a32cd857a.tar.bz2
samba-6d5757395a0e54245543794d0d6d6d6a32cd857a.zip
r11511: A classic "friday night check-in" :-). This moves much
of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy. (This used to be commit 414303bc0272f207046b471a0364fa296b67c1f8)
Diffstat (limited to 'source3/smbd/negprot.c')
-rw-r--r--source3/smbd/negprot.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 65c31449bb..db061cb1b8 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -23,6 +23,7 @@
extern fstring remote_proto;
extern enum protocol_types Protocol;
extern int max_recv;
+
BOOL global_encrypted_passwords_negotiated = False;
BOOL global_spnego_negotiated = False;
struct auth_context *negprot_global_auth_context = NULL;
@@ -115,9 +116,9 @@ static int reply_lanman1(char *inbuf, char *outbuf)
SSVAL(outbuf,smb_vwv5,raw); /* tell redirector we support
readbraw writebraw (possibly) */
SIVAL(outbuf,smb_vwv6,sys_getpid());
- SSVAL(outbuf,smb_vwv10, TimeDiff(t)/60);
+ SSVAL(outbuf,smb_vwv10, set_server_zone_offset(t)/60);
- put_dos_date(outbuf,smb_vwv8,t);
+ srv_put_dos_date(outbuf,smb_vwv8,t);
return (smb_len(outbuf)+4);
}
@@ -157,8 +158,8 @@ static int reply_lanman2(char *inbuf, char *outbuf)
SSVAL(outbuf,smb_vwv3,lp_maxmux());
SSVAL(outbuf,smb_vwv4,1);
SSVAL(outbuf,smb_vwv5,raw); /* readbraw and/or writebraw */
- SSVAL(outbuf,smb_vwv10, TimeDiff(t)/60);
- put_dos_date(outbuf,smb_vwv8,t);
+ SSVAL(outbuf,smb_vwv10, set_server_zone_offset(t)/60);
+ srv_put_dos_date(outbuf,smb_vwv8,t);
return (smb_len(outbuf)+4);
}
@@ -245,9 +246,9 @@ static int reply_nt1(char *inbuf, char *outbuf)
CAP_LEVEL_II_OPLOCKS;
int secword=0;
- time_t t = time(NULL);
char *p, *q;
BOOL negotiate_spnego = False;
+ time_t t = time(NULL);
global_encrypted_passwords_negotiated = lp_encrypted_passwords();
@@ -321,7 +322,7 @@ static int reply_nt1(char *inbuf, char *outbuf)
SIVAL(outbuf,smb_vwv7+1,sys_getpid()); /* session key */
SIVAL(outbuf,smb_vwv9+1,capabilities); /* capabilities */
put_long_date(outbuf+smb_vwv11+1,t);
- SSVALS(outbuf,smb_vwv15+1,TimeDiff(t)/60);
+ SSVALS(outbuf,smb_vwv15+1,set_server_zone_offset(t)/60);
p = q = smb_buf(outbuf);
if (!negotiate_spnego) {