summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-01-28 16:35:13 -0800
committerVolker Lendecke <vl@samba.org>2016-01-29 10:41:01 +0100
commit8024f532e6bcb6cbd8179817fafdd0f12929d629 (patch)
tree0388e3194d5355e79cd120ac3f4990d2d62b2199 /source3
parent6825a22970a71c49accdbdc199c401300d1aff08 (diff)
downloadsamba-8024f532e6bcb6cbd8179817fafdd0f12929d629.tar.gz
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 <hg@sepag.de>. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11703 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Jan 29 10:41:01 CET 2016 on sn-devel-144
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/smb2_create.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 54a598d663d..62948a06969 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -1280,6 +1280,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));