From 1af0aa92b3f3467715f6ffbfedf66df1acc0a83c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 21 Aug 2009 21:44:21 -0700 Subject: Fix bug 6529 - Offline files conflict with Vista and Office 2003 On filesystems that can't store less than one second timestamps, round the incoming timestamp set requests so the client can't discover that a time set request has been truncated by the filesystem. Needs backporting to 3.4, 3.3, 3.2 and (even) 3.0. Jeremy --- source3/include/proto.h | 1 + source3/include/smb.h | 3 +++ 2 files changed, 4 insertions(+) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index 963e6df0c8..1b09732679 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1044,6 +1044,7 @@ struct timespec timespec_current(void); struct timespec timespec_min(const struct timespec *ts1, const struct timespec *ts2); int timespec_compare(const struct timespec *ts1, const struct timespec *ts2); +void round_timespec(struct timespec *ts); struct timespec interpret_long_date(const char *p); void cli_put_dos_date(struct cli_state *cli, char *buf, int offset, time_t unixdate); void cli_put_dos_date2(struct cli_state *cli, char *buf, int offset, time_t unixdate); diff --git a/source3/include/smb.h b/source3/include/smb.h index 9d1e22b064..1347ab228b 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -557,6 +557,9 @@ typedef struct connection_struct { bool ipc; bool read_only; /* Attributes for the current user of the share. */ bool admin_user; /* Attributes for the current user of the share. */ + bool hires_timestamps_avail; /* Does this filesystem honor + sub second timestamps on files + and directories ? */ char *connectpath; char *origpath; -- cgit