summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-05-12 10:50:17 +0200
committerBjörn Jacke <bj@sernet.de>2010-08-31 15:51:11 +0200
commit079baa76884a90740051f8dd0408eea4404adce8 (patch)
tree540e34d34c76eb9030ed0b3aaa477abc2cd883b8 /source3/smbd
parent659829851703797b47d398d3c71ad971b2c5dab7 (diff)
downloadsamba-079baa76884a90740051f8dd0408eea4404adce8.tar.gz
samba-079baa76884a90740051f8dd0408eea4404adce8.tar.bz2
samba-079baa76884a90740051f8dd0408eea4404adce8.zip
s3: use fine grained time in netprot response
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/negprot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 2908c2613e..463e1c8083 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -267,7 +267,7 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
int secword=0;
char *p, *q;
bool negotiate_spnego = False;
- time_t t = time(NULL);
+ struct timespec ts;
ssize_t ret;
struct smbd_server_connection *sconn = req->sconn;
@@ -359,8 +359,9 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
SIVAL(req->outbuf,smb_vwv5+1,0x10000); /* raw size. full 64k */
SIVAL(req->outbuf,smb_vwv7+1,sys_getpid()); /* session key */
SIVAL(req->outbuf,smb_vwv9+1,capabilities); /* capabilities */
- put_long_date((char *)req->outbuf+smb_vwv11+1,t);
- SSVALS(req->outbuf,smb_vwv15+1,set_server_zone_offset(t)/60);
+ clock_gettime(CLOCK_REALTIME,&ts);
+ put_long_date_timespec(TIMESTAMP_SET_NT_OR_BETTER,(char *)req->outbuf+smb_vwv11+1,ts);
+ SSVALS(req->outbuf,smb_vwv15+1,set_server_zone_offset(ts.tv_sec)/60);
p = q = smb_buf(req->outbuf);
if (!negotiate_spnego) {