diff options
author | Jeremy Allison <jra@samba.org> | 2009-08-24 12:30:05 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-08-24 12:30:05 -0700 |
commit | 87d30a1968af66619dfd60f9bc7accde2ac22345 (patch) | |
tree | a9a0c9abf074e997cbceae34f121fa4a6adb1d61 /source3/smbd | |
parent | e829ca560d20e02f34831680a12f3163aee76665 (diff) | |
download | samba-87d30a1968af66619dfd60f9bc7accde2ac22345.tar.gz samba-87d30a1968af66619dfd60f9bc7accde2ac22345.tar.bz2 samba-87d30a1968af66619dfd60f9bc7accde2ac22345.zip |
Second part of fix for 6529 - Offline files conflict with Vista and Office 2003.
ext4 may be able to store ns timestamps, but the only API to *set* timestamps
takes usec, not nsec. Round to usec on set requests.
Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/trans2.c | 11 |
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 ", |