summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 2900e764e8..a1043e27ff 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5409,6 +5409,17 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
round_timespec(&ft->ctime);
round_timespec(&ft->atime);
round_timespec(&ft->mtime);
+ } else {
+ /* The highest resolution timestamp
+ * setting function available in POSIX
+ * is utimes(), which uses usec resolution,
+ * not nsec resolution. So we must round to
+ * usec, then back to nsec. JRA.
+ */
+ round_timespec_to_usec(&ft->create_time);
+ round_timespec_to_usec(&ft->ctime);
+ round_timespec_to_usec(&ft->atime);
+ round_timespec_to_usec(&ft->mtime);
}
DEBUG(5,("smb_set_filetime: actime: %s\n ",