From 5040e1b7ef68fcc03e690d87ed5aaefbee3c459b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 28 Jan 2016 16:35:13 -0800 Subject: [PATCH] s3: smbd: Fix timestamp rounding inside SMB2 create. Setting "dos filetime resolution = yes" should round to 2 second increments. Fix missing path inside smbd. Fix confirmed by reporter Hubert Gilch . BUG: https://bugzilla.samba.org/show_bug.cgi?id=11703 Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Fri Jan 29 10:41:01 CET 2016 on sn-devel-144 (cherry picked from commit 8024f532e6bcb6cbd8179817fafdd0f12929d629) --- source3/smbd/smb2_create.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index ecedd08..2112395 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -1265,6 +1265,14 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, state->out_last_write_ts = result->fsp_name->st.st_ex_mtime; state->out_change_ts = get_change_timespec(smb1req->conn, result, result->fsp_name); + + if (lp_dos_filetime_resolution(SNUM(smb2req->tcon->compat))) { + dos_filetime_timespec(&state->out_creation_ts); + dos_filetime_timespec(&state->out_last_access_ts); + dos_filetime_timespec(&state->out_last_write_ts); + dos_filetime_timespec(&state->out_change_ts); + } + state->out_allocation_size = SMB_VFS_GET_ALLOC_SIZE(smb1req->conn, result, &(result->fsp_name->st)); -- 2.5.0