s3: smb2: Move from using SBVAL to put NTTIMEs on the wire to put_long_date_timespec.
commit375d445b06e5fc9779819e482052db6192e49768
authorJeremy Allison <jra@samba.org>
Wed, 21 May 2014 18:31:44 +0000 (21 11:31 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 27 May 2014 19:08:22 +0000 (27 21:08 +0200)
treee2e6a3e304019c294453fae458f56dd8604b5a9b
parent1f70ad9d3ec2a4c3da4651b74834d5b807410ad4
s3: smb2: Move from using SBVAL to put NTTIMEs on the wire to put_long_date_timespec.

put_long_date_timespec() correctly calls round_timespec()
on the time parameters, and is the correct function to
use when writing *any* file-based NTTIME on the wire.

The smb2_close() code being modified already did this by
hand, and so this doesn't change any of the functionality, only
makes the SMB2 code match all of the other server
code in Samba. Move from using NTTIME variables internally
in the server to struct timespec variables, which is
what all the other server code uses. Only map to
NTTIME as the last step of marshalling the output
data.

Not following the put_long_date_timespec()
convention in the SMB2 create code caused the
round_timespec() step to have been missed in
that code - thus bug:

Bug 3124 - xcopy /d with samba shares works not as aspected

https://bugzilla.samba.org/show_bug.cgi?id=3124

which is a regression from a long-ago bug with
SMB1.

Signed-off-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb2_close.c