summaryrefslogtreecommitdiffstats
path: root/source/include
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-03-12 15:39:38 +0100
committerKarolin Seeger <kseeger@samba.org>2008-04-12 07:48:24 +0200
commit55b6fc1f75ead24258f38d0c8c2088a1899c154b (patch)
tree313f5640839603bfb9b081e67508f9a4bc5e223f /source/include
parent08906a082e526182ed87883a18c9f45de19d6ed2 (diff)
downloadsamba-55b6fc1f75ead24258f38d0c8c2088a1899c154b.tar.gz
samba-55b6fc1f75ead24258f38d0c8c2088a1899c154b.tar.xz
samba-55b6fc1f75ead24258f38d0c8c2088a1899c154b.zip
smbd: implement the strange write time update logic
We now never call file_ntimes() directly, every update is done via smb_set_file_time(). This let samba3 pass the BASE-DELAYWRITE test. The write time is only updated 2 seconds after the first write() on any open handle to the current time (not the time of the first write). Each handle which had write requests updates the write time to the current time on close(). If the write time is set explicit via setfileinfo or setpathinfo the write time is visible directly and a following close on the same handle doesn't update the write time. metze (cherry picked from commit 2eab212ea2e1bfd8fa716c2c89b2c042f7ba12ea)
Diffstat (limited to 'source/include')
-rw-r--r--source/include/smb.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/include/smb.h b/source/include/smb.h
index d4bbe2d0ffc..70e980a12ce 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -485,9 +485,13 @@ typedef struct files_struct {
struct timeval open_time;
uint32 access_mask; /* NTCreateX access bits (FILE_READ_DATA etc.) */
uint32 share_access; /* NTCreateX share constants (FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE). */
- bool pending_modtime_owner;
- struct timespec pending_modtime;
- struct timespec last_write_time;
+
+ bool update_write_time_triggered;
+ struct timed_event *update_write_time_event;
+ bool update_write_time_on_close;
+ struct timespec close_write_time;
+ bool write_time_forced;
+
int oplock_type;
int sent_oplock_break;
struct timed_event *oplock_timeout;