s3: smb2: Move from using SBVAL to put NTTIMEs on the wire to put_long_date_timespec.
authorJeremy Allison <jra@samba.org>
Wed, 21 May 2014 18:57:16 +0000 (11:57 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 27 May 2014 19:07:16 +0000 (21:07 +0200)
commitaf13e3e0a5d198e33ca0d104593e84b910ffc0af
treecc3962a8d8c2d972c084b54ca05c42cca7e617b9
parentf3fd95f621845c71c6dcf997e162f6b91574a55f
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.

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.

The previous SMB2 create code missed the round_timespec()
call before marshalling.

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_create.c